xml

XSLT IE6 default processor

What is the default XSLT processor for IE6. Does it support EXSLT? Is there anyway to make it support it? ...

What are best practices for designing XML schemas?

As an amateur software developer (I'm still in academia) I've written a few schemas for XML documents. I routinely run into design flubs that cause ugly-looking XML documents because I'm not entirely certain what the semantics of XML exactly are. My assumptions: <property> value </property> property = value <property attribute="attv...

Best way to pretty print XML response in grails.

given this in a grails action: def xml = { rss(version: '2.0') { ... } } render(contentType: 'application/rss+xml', xml) i see this: <rss><channel><title></title><description></description><link></link><item></item></channel></rss> is there an easy way to pretty print the xml? something built into the render method,...

Nice bit of code to format an xml string

hi Anyone got a ready made function that will take an XML string and return a correctly indented string? eg <XML><TAG1>A</TAG1><TAG2><Tag3></Tag3></TAG2></XML> and will return nicely formatted String in return after inserting linebreaks and tabs or spaces? Yes I know the code is easy to write but I'm sure someone else has already w...

XML to WordML using XSLT 1.0 - replace html tags within xml content with wordML formatting tags

I am creating a WordML document from an xml file whose elements sometimes contain html-formatted text. <w:p> <w:r> <w:t> html formatted content is in here taken from xml file! </w:t> </w:r> </w:p> This is how my templates are sort of set up. I have a recursive call-template function that does text replacement against the so...

XmlReader - Read Current Node as string

In the following snippet, using XmlReader, when I encounter an element. I would like to read it as-is, including all attributes and namespace decoration in the element. Using the oXml.Name property, I am only able to get the tag name. Is there a function to get the tag itself? oXml = XmlReader.Create(path, oXmlSettings) While oXml.Read(...

How to read XML sent using XMLHTTP in codebehind file ?

I have a javascript code where i am creating an XML Dom and sending (using XMLHTTP ) it to a codebehind page (server.aspx.cs).How can i read the XML there ? ...

Compression XML metrics . .

I have a client server application that sends XML over TCP/IP from client to server and then broadcast out to other clients. How do i know at what the minimun size of the XML that would warrant a performance improvement by compression the XML rather than sending over the regular stream. Are there any good metrics on this or examples? ...

How to convert xsd to human readable documentation?

We have a few XML based interfaces that is quite well documented in XSD schemas. The interfaces are now going to be publicly available and we would like to create reference documentation for them. Is there a tool that can automatically convert XSD files into some more readable format? ...

XPath search with ElementTree

New to xml. Looking for XPath to search a xml file with python ElementTree format <root> <child>One</child> <child>Two</child> <child>Three</child> </root> to do search for child with "Two" and return true/false if it was started off like from elementtree import ElementTree root = ElementTree.parse(open(PathFile)).getroot() how ...

PHP4: Send XML over HTTPS/POST via cURL?

I wrote a class/function to send xml over https via PHP4/cURL, just wondering if this is the correct approach, or if there's a better one. Note that PHP5 is not an option at present. /** * Send XML via http(s) post * * curl --header "Content-Type: text/xml" --data "<?xml version="1.0"?>...." http://www.foo.com/ * */ function sendX...

How to store xml files in an xml column using linq to sql?

I have xml files I want to read in and store in the database. Linq to sql requires the data to be sent in using an xelement, but if I send in the data this new XElement("build", BuildNode.InnerXml) I end up with data looking like this in the database lt;..gt;.. It converts the brackets into lt; and gt; which then makes the data useles...

How to write a datarow to a xml file

Here is the story. I was doing a program, every time the program is closed all the data(File links) created by the user is lost, so whenever the user reopen the program, he does have to do all the work again. So I decided to use an xml file to store the data, because a dbms would take too long to load and code to handle a plain text fil...

How to Convert complex XML structures to DataSet with multiple tables

What is the best way to convert an XML document to a .NET 2.0 DataSet. The XML document contains complex structures with parent-child relationships and should be transformed into multiple tables in the DataSet. The DataSet tables should also maintain the relationship among tables. right now, I've to write custom XSLT to do this transform...

Converting one XML document into another XML document

I want to convert an XML document containing many elements within a node (around 150) into another XML document with a slightly different schema but mostly with the same element names. Now do I have to manually map each element/node between the 2 documents. For that I will have to hardcode 150 lines of mapping and element names. Somethin...

How to determine if XElement.Elements() contains a node with a specific name?

For example for the following XML <Order> <Phone>1254</Phone> <City>City1</City> <State>State</State> </Order> I might want to find out whether the XElement contains "City" Node or not. ...

How to get xpath from an XmlNode instance. C#

Could someone supply some code that would get the xpath of a System.Xml.XmlNode instance? Thanks! ...

How do I view the contents of an IXMLDOMElementPtr when building an XML file?

I'm using IXMLDOM in MSXML 6 to build an XML file in a C++ MFC application. Is there a way to see the contents of the xml document while it is in memory? For example, an XPATH query is failing about halfway through creating the file. How would I view the entire contents of the xml doc? Thanks! ...

XmlReader - Self-closing element does not fire a EndElement event?

I am using XmlReader in .NET to parse an XML file using a loop: while (xml.Read()) { switch xml.NodeType { case XmlNodeType.Element: //Do something case XmlNodeType.Text: //Do something case XmlNodeType.EndElement: //Do something } } I was wondering if it was normal that the following XML code ...

Get the names of attributes from an element in a SQL XML column

For this xml (in a SQL 2005 XML column): <doc> <a>1</a> <b ba="1" bb="2" bc="3" /> <c bd="3"/> <doc> I'd like to be able to retrieve the names of the attributes (ba, bb, bc, bd) rather than the values inside SQL Server 2005. Well, XPath certainly allows this with name() but SQL doesn't support that. This is my chief complaint wi...