xml

How to deserialize an element as an XmlNode?

When using Xml serialization in C#, I want to deserialize a part of my input XML to an XmlNode. So, given this XML: <Thing Name="George"> <Document> <subnode1/> <subnode2/> </Document> </Thing> I want to deserialize the Document element to an XmlNode. Below is my attempt which given the XML above, sets Document to the 's...

XML: What to use as a list separator

There are two ways to specify lists of values in XML. Variant 1: <Database Name="myDatabase"> <Table Name="myTable1" /> <Table Name="myTable2" /> <Table Name="myTable3" /> ... </Database> Variant 2: <Database Name="myDatabase" Tables="myTable1 myTable2 myTable3 ..." /> Clearly, Variant 1 is cleaner and can be exten...

Easily read and write XML using C#

I have already found something for reading XML, however I find it difficult to write and update XML. Can anybody please help in giving some code or advice on the best way of writing to XML files? ...

Save a form in an XML file using Ajax and JSP

Hello, I want to create a simple form with a name and an email and save these data in an XML file. So far I found that using Ajax with jQuery is quite easy. So I used the usual code: //dataString have the values taken from the form var dataString = 'name='+ name + '&email=' + email; $.ajax({ type: "POST", url: "users.xml", data: data...

Dataset -> XML Document - Load DataSet into an XML Document - C#.Net

Hello I'm trying to read a dataset as xml and load it into an XML Document. XmlDocument contractHistoryXMLSchemaDoc = new XmlDocument(); using (MemoryStream ms = new MemoryStream()) { //XmlWriterSettings xmlWSettings = new XmlWriterSettings(); //xmlWSettings.ConformanceLevel = ConformanceLevel.Auto; using (XmlWriter xmlW = ...

Organising XML results as cells in container (AS3)

Hi, I'm having some problems figuring out how to organise data pulled off XML in cells within a container. I'm sure this should be a basic thing in AS3, but my head's fried.. can anyone help? Basically an array if fed to callThumbs() which iterates through it and compares the entries with preloaded XML _my_images. If match is found, it...

System.XML or Regex.Replace?

I'm generating a large amount of XML documents from a set of values in an Excel file. The only thing that changes for each XML document is the values. I figured the best way to generate these documents was to make a "XML skeleton" (since the XML format never changes) and then plug in symbols like "&%blahNameblahTest", so then I could j...

jquery XML feed reader that passes in username/password

I'm looking for a jQuery solution that will allow me to read an XML feed that requires authentication. I have something that partially works, but I don't know how to pass credentials when calling the XML feed. I know that ideally I shouldn't put credentials in jQuery but they are innocuous in this instance so it's ok. ...

How should i output my MySQL data into json in this kind format?

Im not sure how to output MySQL data into formats below. (eg: timelist, usersex, userage from table users.) <script type="text/javascript"> timeList = new Array(), userSex = new Array('female','male','male'), userAge = new Array('21','36'), userMid = new Array('liuple','anhu'); </script> Thanks! ...

Large XML files in dataset (outofmemory)

Hi folks, I am currently trying to load a slightly large xml file into a dataset. The xml file is about 700 MB and every time I try to read the xml it needs plenty of time and after a while it throws an "out of memory" exception. DataSet ds = new DataSet(); ds.ReadXml(pathtofile); The main problem is, that it is necessary for me to u...

Using GWT to output XML, JSON and regular HTML

Sorry, this is a very basic question, as we are just getting started with exploring GWT. We would like to know if it's easy and possible to get GWT to "output" XML, JSON and regular HTML. I would like to know this because ideally we would port parts of our backends over slowly, and it would be nice to drop in GWT in place of AJAX wherev...

What is the XSLT to write certain node attributes one-to-a-line?

I want an XML stylesheet (XSLT) that will put the attributes of a few, specific, child nodes one-to-a-line. What is the XSLT for this? I recently asked a related question that someone offered a stylesheet to solve but their stylesheet didn't work for some reason, and I am curious why -- the attributes simply didn't end up one-per-line....

extract data from Plist to array and dictionary

Hi I made a plist that looks like that: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList 1.0.dtd"> <plist version="1.0"> <array> <array> <dict> <key>Company</key> <string>xxx</string> <key>Title</key> <string>VP Marketi...

.net3.5: xml file should not be part of dll?

I dont want xml files to be part of dll. I want to change xml files after deploying dll on production.What shd i do? ...

e4x vs XPath: Which one to use when going with action script programming in Flex?

e4x programming extension is native to Actionscript and makes sense to use it over Xpath or any other DOM interfaces. I would like to know from flex community if they had any bad experiences like performance, etc, or any other gotchas. ...

Get nested item from XML with jQuery

I've looked at some examples on the web but I am still struggling with this. I would like to get the value for "descShort" tag within the "indexDesc" tag and then after that display the value from the "last" tag? I've seen people using the arrow > but I'm still lost. <indices> <index> <code>DJI</code> <exchange>NYSE...

JSP compilation error upon changing XML parser to Xerces

All, I'm working on a java webapp that we deploy in the Resin web app server. I have been doing some XML parsing for a new part of the application, and realized that our app was using Resin classes to do the parsing. I wanted to get away from that and use something more standard for a number of reasons, so I set these system properti...

Dataset.ReadXml() - Invalid character in the given encoding

Hello all I have saved a dataset in the sql database in an xml column using the following code. XmlDataDocument dd = new XmlDataDocument(dataset); and passing this xml document as sql parameter using param.value = new XmlNodeReader(dd); The XML is like <NewDataSet><SubContractChangeOrders><AGCol>1</AGCol><SCO_x0020_Number>001</SC...

Svcutil generating bad config with multiple endpoints

I have a WCF service that has exposed a soap and an xml endpoint. When I use svcutil to generate the proxy code on the client side the generated configuration contains two endpoints which causes the client to fail. If I edit the web.config file and remove the second endpoint (with the custom binding) all works as expected. Is there a ...

Looping through Markers with Google Maps API v3 Problem

I'm not sure why this isn't working. I don't have any errors, but what happens is, no matter what marker I click on, it always clicks the last marker. Im not sure why though because the_marker is set up the same way. How can I fix this?: (Updated with new jQuery + XML) $(function(){ var latlng = new google.maps.LatLng(45.522015,-12...