xml

Architecture: set-based data pipeline challenge

I'm working on a database driven web-application (ASP.NET, SQL 2008), which receives structured XML data from various sources. The data resembles a set, and often needs 'cleanup', so it is passed through the database as XML, and turned into a resultset for display. I'd like to capture the produced 'clean' results, and send them to an a...

Can I add one XmlDocument within a node of another XmlDocument in C#?

I have two XmlDocuments. Something like: <document1> <inner /> </document1> and <document2> <stuff/> </document2> I want to put document2 inside of the inner node of document1 so that I end up with a single docement containing: <document1> <inner> <document2> <stuff/> </document2> </inner> </document1> ...

Deserialization requires casting?

I was reading this article, where they have this code: // Serialization XmlSerializer s = new XmlSerializer( typeof( ShoppingList ) ); TextWriter w = new StreamWriter( @"c:\list.xml" ); s.Serialize( w, myList ); w.Close(); // Deserialization ShoppingList newList; TextReader r = new StreamReader( "list.xml" ); newList = (ShoppingList)s....

Non-(X)HTML Attributes... any disadvantages?

I've generally tried to stick with DOM-only attributes when writing Javascript. Now that I've switched from Prototype to jQuery, I can get some serious mileage out of adding my own attributes to various DOM elements, mostly in the realm of being able to set up a very readable coding convention for handling AJAX requests. As a short exa...

iphone: making a new UIImage from data from an XML document

Hi all, I'm prototyping a video streaming client for the iphone that gets it's content from a webserver written in C#. The server outputs an XML document where the jpg data for the image is stored in one of the tags (). It writes it out using WriteBase64. On the iPhone, I'm using libxml to parse the xml and storing the bytes for th...

Traverse xml structure to determine if a certain text node exists

Alright I have an xml document that looks something like this: <xml> <list> <partner> <name>Some Name</name> <status>active</status> <id>0</id> </partner> <partner> <name>Another Name</name> <status>active</status> <id>1</id> </partner> </list> </xml> I ...

How do I convert XML into a java value object?

What kind of open-source libraries are available to convert XML into a java value object? In .Net, there is a way to easily do this with xml serialization and attributes. I would imagine there some parallel in java. I know how to do this with a DOM or SAX parser, but I was wondering if there was an easier way. I have a predefined XML ...

Using C# and XDocument/XElement to parse a Soap Response

Here is a sample soap response from my SuperDuperService: <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt; <soap:Body> <MyResponse xmlns="http://mycrazyservice.com/SuperDuperService"&gt; <Result>3234...

What data type do I use for an integer in SOAP XML in Cocoa?

I imagine it is just an int, but I want to verify. Thanks Corey ...

Maximum length of [NSXMLNode stringValue]

Hello all, I have an XML document which contains an element that is over 90,000 characters in length*. NSXMLNode* node = ...; NSString* val = [node stringValue]; // this is not the full contents of the node! The second line only gives me 80k or so. This is obviously not what I want, so I'd appreciate some suggestions. Is NSXMLNode b...

create xml file from sql script

how to Generate xml file in sql server 2005 using tsql ...

XML Parsing

I have a XML file which contains the a parent node then child node which are more that one.So in these child nodes if there are duplicate keys both has to be merged one <availexport> <date>090423121513</date> <employee emp_cd="9120004"> <day date="20050406" start="10" end="20"/> <day date="20050406" start="21" end="23"/> ...

Problem validating against an XSD with Java5

I'm trying to validate an Atom feed with Java 5 (JRE 1.5.0 update 11). The code I have works without problem in Java 6, but fails when running in Java 5 with a org.xml.sax.SAXParseException: src-resolve: Cannot resolve the name 'xml:base' to a(n) 'attribute declaration' component. I think I remember reading something about the version...

XML Schema: Why can't <xs:all> have <choice> children? and how can this be bypassed?

I'm trying to create a schema for a <property> element which must have a <key> sub-element, and one of <val>, <shell> or <perl> and an optional <os> or <condition>, and the order of the sub-elements doesn't matter. Here are some sample for valid <property> elements: <property> <key>A</key> <val>b</val> </property> <property> <k...

Querying List Data From SharePoint Web Services

Has anybody ever successfully written code to extract data from a SharePoint 2007 list (specifically, an InfoPath form library) using the GetListItems() method in the http:///_vti_bin/lists.asmx service (and lived to tell about it)? It returns some of the worst XML I've seen in my life (it's not even compliant XML). Is there some easy w...

Database for Importing NUnit results?

I have a large set of NUnit tests; I need to import the results from a given run into a database, then characterize the set of results and present them to the users (email for test failures, web presentation for examining results). I need to be tracking multiple runs over time, as well (for reporting failure rates over time, etc.). The...

getting XML data from Xerces (c++)

I am a latecomer to XML - have to parse an XML file. Our company is using xerces already so I managed to cobble together a sample app (SAX) that displays all the data in a file. However, after parsing is complete I was expecting to be able to call the parser or some other entity that had an internal representation of the file and itera...

Some help getting an XML response from a GET request using ASP.NET (see code)?

Can't seem to figure this out, see code below. Trying to make a GET request to Basecamp and store the XML it returns in memory so I can parse it. Not sure how to exactly 'fire' the request off or get back the XML from it, please advise. using System; using System.Web; using System.Data; using System.Xml; using System.Net; using System.I...

XPath Selection Based on Expiration Date Attributes

Given this XML: <?xml version="1.0" encoding="utf-8"?> <content dataType="XML"> <item type="Promotion" name="Sample Promotion" expires="04/01/2009"> <![CDATA[ <p>Details here.</p> ]]> </item> <item type="Promotion" name="Sample Promotion 2" expires="05/01/2009"> <![CDATA[ <p>Details here.</p> ]]> </it...

Returning a complex type from its XML representation in a .NET web service

I have an XML document in a database, which is the XML-serialized representation of an instance of a certain class Foo: <?xml version="1.0" encoding="utf-16"?> <Foo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" <StringProp>hello</StringProp> <IntProp>5</IntProp> </Foo> Supp...