xml

Why, in AS3, are XML and XMList unrelated (inheritence wise) classes?

I can't help think that making XML ad XMLList both unrelated, as in both extend Object directly, is a design flaw in the AS3 core library. Surely having XML extend XMLList would be a much cleaner system, where XML is considered an XMLList with only one member? This would also avoid the very annoying practice of an E4X query possibly re...

Adding a namespace to a nested element

I have some XML similar to this: <envelope xmlns="http://test"&gt; <header> <msgId /> </header> <body> <element1 /> </body> </envelope> I want to add a namespace to the <element1> node. Can anyone help me how to do this with XSLT? ...

Auto Deserialize XML into a class collection within Silverlight?

Sorry if this is generic in nature, but I have a question that maybe is related to my lack of understanding of some core underlying rules of .NET and Silverlight. I have a basic project at the moment that simply: An ASP.NET generic handler writes out XML Within Silverlight, I am using the WebClient object to get the XML output, in fac...

Java castor using custom field handlers

Hey, I have been trying to write a custom field handler which returns the hash code of a java.awt.Image object when writing to XML and retrieves an image based on this hash code when binding the XML to an object. For some reason, I can't get this to work; castor, from what I can tell, simply instantiates the field handler and then does...

What is the difference between XLink, XPointer and XInclude?

It's so confusing. Could somebody please explain the difference? ...

Add XML namespace to existing document in ruby

I need to add an element to an existing XML document which uses a namespace that doesn't exist in the original. How do I do this? Ideally I would like to use REXML for portability, but any common XML library would be okay. An ideal solution would be smart about namespace collisions. I have an xml document which looks like this: <xrds:...

Visual Studio XSD Tool: Generate Collections Rather Than Arrays

I generated some C# classes from an XSD using the Visual Studio XSD utility and it generated arrays for storing a collection of elements, rather than one of the built-in generic Collection<T> (or related) classes. None of the command line parameters mentioned in xsd /? mention anything about generating collections rather than arrays, bu...

DataContract vs. XmlType

As part of trying to learn WCF, I am reading up on serialization. I am struggling to understand how I can control serialization in .NET 3.5. For instance, I have a simple class with a few public properties. By adding the DataContract attribute to that class, I can for instance control the namespace and the name of the class as it is seri...

Modify XML in SQL server to add a root node

To give some background to this problem first, I am rewriting some code that currently loops through some xml, doing an insert to a table at the end of each loop - replacing with a single sp that takes an xml parameter and does the insert in one go, 'shredding' the xml into a table. The main shred has been done successfully,but curren...

How to read an XML file in a Visual C++ application?

How to read an XML file in a Visual C++ application? I need to read an XML file in a Visual Studio 2003 C++ COM ATL application - unmanaged code. What library should I use: msxml, xmllite, other? I need to check that the xml satisfies its xsd I've defined and then read it. Sample code welcomed ;) Thanks in advance. ...

Getting HTMLUnknownElement with jQuery.find() and an XML Document

I'm attempting to load up an XML document (specifically an RSS feed) via an Ajax request, parse it, and insert some information based on said feed into my page. The code works fine in Firefox, Opera, Chrome, and Safari, but not IE7. Go figure. After doing some initial debugging, I've found that the XML string is being retrieved via the ...

How to generate a treeview in html from flexible xml just in client side

Hi, Could anyone please give me an example in this? I have found many but they didn't match my requirement. The treeview must have expand and collapse, the xml is flexible, which means I should test if a node is exist, and there are many may appear many times and with different contents. Also, I need it works just in client side, nothi...

How can I search for a value in an object?

I have a PHP script that goes through an XML file, but I want to be able to search the object for a value, just like I can search an array for a value. According to comments on PHP.net, array_search() supports objects as of PHP5, but I can't get it to work. The XML file is a list for bus stops, and I want to be able to search through t...

How can I use XPath to perform a case-insensitive search and support non-english characters?

I am performing a search in an XML file, using the following code: $result = $xml->xpath("//StopPoint[contains(StopName, '$query')]"); Where $query is the search query, and StopName is the name of a bus stop. The problem is, it's case sensitive. And not only that, I would also be able to search with non-english characters like ÆØÅæøå...

How to extend this XSLT to include XML fields dynamically?

We need to parse an XML file with XSLT into a CVS file. The code below works but only if the fields in the XML are always constant. The fields in the our XML file will always vary. How can I change my XSLT file so that it dynamically includes in the CSV file all the fields from the XML file? XML: <?xml version="1.0" encoding="iso-8859...

Group data when shredding xml to multiple tables in SQL server

This follows on from this question: http://stackoverflow.com/questions/624206/modify-xml-in-sql-server-to-add-a-root-node/ In addition to the problem posed and now fixed in that question, I am also splitting the existing table into 2, where the 2nd table is a sub-table of the first, with a foreign key back to the first. So currently ...

VB.Net Web Services For Dummies

(Edited to add an example and hopefully make it a bit clearer) I'm mainly a VB6 developer, but am currently trying to write a web service using VB.Net to allow for communication between our product and a third-party. The third-party software will invoke our web service to update various data. I've read up various things on how to do t...

Using XQuery in SQL Server 2005 to get XML Inner Text

How do I select the inner text of an XML node using XQuery? Microsoft Books Online shows how to retrive an attribute below: DECLARE @myDoc xml DECLARE @ProdID int SET @myDoc = '<Root> <ProductDescription ProductID="1" ProductName="Road Bike"> <Features> <Warranty>1 year parts and labor</Warranty> <Maintenance>3 year parts and labor...

How do I determine if an XmlNode has a specific attribute?

I would like to place an if condition within the sub that will tell it to run when the xml node STORE with attribute TEST="test.doc" does not exist. Any suggestions would be great. I'm new to vb. Sub InsertNode(ByVal doc As XmlDocument) Dim City As XmlNode = doc.DocumentElement Dim Location As XmlElement = doc.CreateElemen...

XSLT: How to get file names from a certain directory?

Is there a function in XSLT that can takes in a directory path and gives back all the files in it?? I have a xml file now reads like this <filelist> <file>fileA.xml</file> <file>fileB.xml</file> </filelist> Now, there's directory called dir, has files fileX.xml, fileY.xml and a bunch of other xml files in it. I want to add th...