CodePaste Logo
New Snippet New Snippet Recent Snippets Recent Snippets My Snippets My Snippets Web Code Search Snippets Search
Sign inor Register
Format:
Recent snippets matching tags of XML
C#
public sealed partial class BlankPage : Page
{
    public BlankPage()
    {
        this.InitializeComponent();
 
        var _String = "<special:Users xmlns:special='http://jerry'><User Key='1' Name='Jerry' /><User Key='2' Name='Michael' /></special:Users>";
        using (var _Reader = System.Xml.XmlReader.Create(new StringReader(_String)))
        {
            var _Serializer = new System.Xml.Serialization.XmlSerializer(typeof(Users));
by Jerry Nixon   May 15, 2012 @ 3:01pm
12 Views
no comments
 
C#
const string KEY = "MyUniqueKey";
 
private void SaveButton_Click(object sender, EventArgs e)
{
    var _Store = IsolatedStorageFile.GetUserStoreForApplication();
    using (var _Stream 
        = new IsolatedStorageFileStream(KEY, FileMode.Create, _Store))
    {
        var _Data = MyTextBox.Text;
        var _Serializer = new XmlSerializer(typeof(string));
by Jerry Nixon   November 01, 2011 @ 3:22pm
69 Views
no comments
 
XML
<?xml version="1.0" encoding="utf-8"?>
 
<manifest>
 
    <uses-permission />
    <permission />
    <permission-tree />
    <permission-group />
    <instrumentation />
    <uses-sdk />
by TonHor   September 25, 2011 @ 5:41am
Tags: android, xml
80 Views
1 comments
 
//-----------------------------------------------------------------------------\\
//----------------   Methods to access XML files using java   -----------------\\
//------ based on the simple example file: http://codepaste.net/8joo9z --------\\
//-----------------------------------------------------------------------------\\
 
public class xmlAccessor
{
// print a list of all users, optionally this may be useful to return a collection of users...
public void printUsers()
{        
by Johannes   August 12, 2011 @ 7:34am
Tags: XML, Java, SE
92 Views
no comments
 
XML
<?xml version="1.0"?>
<users>
    <user>
        <firstname>Hans</firstname>
        <lastname>Meyer</lastname>
        <alias>Hans</alias>
        <password>test</password>
        <computerName>Johannes-WinMBA</computerName>
        <lastLogin>test</lastLogin>
    </user>
by John   August 12, 2011 @ 6:49am
Tags: XML
111 Views
no comments
 
C#
 
//////////////////////////////////////////////////////////////////////////////////////////////////////////
 
 
// Create the query 
var custs = from c in XElement.Load("Customers.xml").Elements("Customers") 
          select c ;
 
// Execute the query 
foreach (var customer in custs) 
by Jelana   August 11, 2011 @ 4:15am
Tags: xml, linq
114 Views
no comments
 
public XElement GetXElementFromXmlElement(XmlElement xmlElement)
{
      return XElement.Load(xmlElement.CreateNavigator().ReadSubtree());
}
by BillZ   July 07, 2011 @ 1:15pm
Tags: Xml
105 Views
no comments
 
C#
using System;
using System.Collections.Generic;
using System.Xml.Linq;
using FizzWare.NBuilder;
using Microsoft.VisualStudio.TestTools.UnitTesting;
 
namespace Tests.Reporting
{
    [TestClass]
    public class DynamicXmlFormatting
163 Views
no comments
 
C#
/// <summary>
/// Load all persons from file on disk.
/// </summary>
public List<Person> Load(string fileName)
{
   try
   {
      using (StreamReader reader = new StreamReader(fileName))
      {
         XmlSerializer serializer = new XmlSerializer(typeof(List<Person>));
by Tolga Balci   April 04, 2011 @ 8:40pm
Tags: XML
118 Views
no comments
 
C#
/// <summary>
/// Serialize anything
/// </summary>
/// <param name="serializeMe"></param>
/// <returns></returns>
public static string Serialize<T>(T serializeMe)
{
    var serializer = new XmlSerializer(serializeMe.GetType());
    var ms = new MemoryStream();
    serializer.Serialize(ms, serializeMe);
by rawbert   February 25, 2011 @ 12:49am
110 Views
no comments
 
[System.Runtime.Serialization.DataMemberAttribute()]
       public Moneycorp.Gateway.EntityReference Client
       {
           get
           {
               return this.ClientField;
           }
           set
           {
               if ((object.ReferenceEquals(this.ClientField, value) != true))
by Unknown (google)   October 18, 2010 @ 3:45am
Tags: XML
110 Views
no comments
 
XML
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd">
  <url>
    <loc>http://forevony.com/buy/index.php?main_page=document_general_info&cPath=63&products_id=181</loc>
    <lastmod>2010-03-20T22:18:04Z</lastmod>
    <changefreq>weekly</changefreq>
    <priority>0.5</priority>
  </url>
  <url>
    <loc>http://forevony.com/buy/index.php?main_page=index</loc>
by FoxyComputersLtd   March 21, 2010 @ 7:44pm
293 Views
no comments
 
'Form1.vb
#Region " Import Declaratives "
 
Imports DevExpress.XtraEditors
Imports DevExpress.Utils.Menu
Imports System.IO
Imports System.Xml.Serialization
 
#End Region
by Thom Lamb   February 11, 2010 @ 6:53am
2631 Views
no comments
 
C#
// Sample XML File
 
<?xml version="1.0" encoding="utf-8" ?>
<Girls>
<Girl>
<Name>Camilla Belle</Name>
<DateOfBirth>October 2, 1986</DateOfBirth>
</Girl>
<Girl>
<Name>Megan Fox</Name>
by jparra   January 22, 2010 @ 8:39am
Tags: XML
148 Views
no comments
 
<Node>
   <ID>123</ID>
   <Name>ABC</Name>
</Node>
<Node1>
   <ID>124</ID>
   <Name>DEF</Name>
</Node1>
 
by tarasn   January 14, 2010 @ 2:37pm
254 Views
no comments
 
Module Module1
 
    Sub Main()
        Dim InputXml = <?xml version="1.0" encoding="utf-8"?>
                       <users>
                           <user id="1" name="Eduardo"/>
                           <user id="2" name="Luciano"/>
                           <user id="3" name="Ricardo"/>
                       </users>
378 Views
no comments
 
XML
<?xml version="1.0" encoding="utf-8"?>
<Report xmlns="http://schemas.microsoft.com/sqlserver/reporting/2005/01/reportdefinition" xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner">
    <DataSources>
        <DataSource Name="DummyDataSource">
            <rd:DataSourceID>0548d639-2bfb-43c4-894a-255a4657cc64</rd:DataSourceID>
            <ConnectionProperties>
                <DataProvider>SQL</DataProvider>
                <ConnectString />
            </ConnectionProperties>
        </DataSource>
by Luciano Evaristo Guerche (Gorše)   December 22, 2009 @ 7:53am
1766 Views
no comments
 
#include wconnect.h
 
SET PROCEDURE TO wwXmlState.prg ADDITIVE
 
#IF .F.   && Sample code
CLEAR
oState = CREATEOBJECT("wwXMLState")
 
 
oState.LoadXML(FULLPATH( "test.xml"),.T.)
by Rick Strahl   November 28, 2009 @ 1:46am
Tags: XmlState
621 Views
2 comments
 
C#
namespace SignAndEncryptXmlDocumentConsoleApplication
{
    using System;
    using System.IO;
    using System.Security.Cryptography;
    using System.Security.Cryptography.Xml;
    using System.Xml;
 
    class Program
    {
669 Views
no comments
 
C#
using System;
 
using System.Collections.Generic;
 
using System.IO;
 
using System.Linq;
 
using System.Linq.Expressions;
by Athens Springer   October 29, 2009 @ 7:31am
Tags: C#, OpenXml
217 Views
no comments
 
brought to you by:
West Wind Techologies



If you find this site useful and use it frequently please consider making a donation to support this free service.
Donate