xml

Java XML Parsing and original byte offsets.

I'd like to parse some well-formed XML into a DOM, but I'd like know the offset of each node's tag in the original media. For example, if I had an XML document with the content something like: <html> <body> <div>text</div> </body> </html> I'd like to know that the node starts at offset 13 in the original media, and (more importantly...

Looking for a free current road traffic information web service (think XML/SOAP/RSS..)

Hello, I'm looking for a web service that provides traffic information (accidents, all clear (if poss?), congestion etc..) for roads in the UK, specifically around Portsmouth (south east England.) Service must be free to use Non-commercial license is OK I had a look on google and found the Highways agency does an RSS feed.. however ...

How to generate a XML from XML in jQuery (Javascript)?

I'm trying to generate a XML from client side XML according to this link. But it isn't work. Here is my js code: // XML Builder $.createElement = function(name) { return $('<'+name+' />'); }; $.fn.appendNewElement = function(name) { this.each(function(i) { $(this).append('<'+name+' />'); }); return this; } ...

Infopath XML query from C#

Hi, I have included an XML file in my InfoPath form as a secondary data source. The data connection is named Divisions. Below is the structure and content of the file: <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <Divisions> <Division> <Name>Business Application Services</Name> <Abbr>BAS</Abbr> </Divi...

Receiving plain XML in .NET WCF service

Hi! I'm setting up a really simple WCF service whos only job is to receive an XML-message via SOAP and send the message on to an internal service. Let's say the one I'm creating is a guardpost of such. (Actual names have been substituted for example) Initial info: I cannot change the external service calling on me. As far as I know i...

How to extract this format in xslt

Hi All, I have an xml structure: <Date>Mon, 11 Aug 2009 13:15:10 GMT</Date> i want to extract only 15:10 or '15' and '10'. What is the best way to do that using xslt ...

How to handle < and > symbols in HttpService if we use xml as a result format ?

I used a httpservice which returns a xml as a result.But the content itself has a '<' symbol or '>' symbol , it leads to error ! How can i handle this? Thanks in advance. ...

Email templates stored in XML. How to execute php inside the xml?

Hi all, I have an email xml file like this: <?xml version='1.0' standalone='yes'?> <emails> <email id="contract-expired"> <description>We send this email when we want to inform a user that a contract is coming up to it's expiration date</description> <subject>Example: Contract Expiration</subject> <parameters> <par...

How can I retain doctype info in xml documnet during read/write process?

I am reading an xml document, inserting an element and then writing it. In this process, the document loses doctype and dtd info. Through "Transformer" class I can set OutputProperties but my requirement is to insert or update some element and not to play with doctype at all. Could somebody give me a hint? ...

Regarding XPath

When i am checking an XPath of a link, it appears to be: id('content')/x:table/x:tbody/x:tr/x:td[2]/x:table/x:tbody/x:tr[2]/x:td[1]/x:table/x:tbody/x:tr[2]/x:td/x:table/x:tbody/x:tr[2]/x:td/x:table/x:tbody/x:tr[1]/x:td/x:table/x:tbody/x:tr/x:td/x:table/x:tbody/x:tr[2]/x:td/x:table/x:tbody/x:tr/x:td[4]/x:a[2] How can I use it in in tar...

Convert XPathDocument to string

I have an XPathDocument and would like to export it in a string that contains the document as XML representation. What is easiest way of doing so? ...

javascript xml filter results

< os owner="microsoft" version="windows xp" link="microsft.com/windows98" information="microsoft.com/windows98/more_info" / > < os owner="microsoft" version="windows 2000" link="microsft.com/windows2000" information="microsoft.com/windows2000/more_info" / > < os owner="microsoft" version="windows windows 7" link="microsft.com/windows...

Maximum number of attributes a node has in a XML document

We are interested in finding maximum number of attributes a node has in a XML document. My code is below using C#: XmlDocument xmlDoc = new XmlDocument(); xmlDoc.Load(@"C:\ABC.xml"); XmlNode root = xmlDoc.DocumentElement; int nodeAttrCount = 0; foreach (XmlNode node in root) ...

Where can I find a valid SVG XML Schema (for ecore generation) ?

I tried importing the SVG XML Schema into EMF, to obtain the SVG metamodel in ecore. However, the import failed due to the schema not being valid: indeed, svg.xsd references XMLSchema.dtd, which itself references datatypes.dtd, which does not exist! Consequently, I tried downloading the necessary files from the svg website (svg.xsd, XML...

how to convert an XML into an array in asp.net

Hello All, i need to convert an XML into an array using asp.net. I tried searching on the web but couldn't find the proper solution. Can someone please help me with this Thanks, Alloi ...

Using SimpleXML to loop through muliple entries

Hi Im trying to parse an xml feed using simplexml in php. The xml feed is laid out as follows: <Member> <MemberType>Full</MemberType> <JoinDate>2010-06-12</JoinDate> <DataType>A</DataType> <Data> <FirstName>Ted</FirstName> <LasttName>Smith</LasttName> <Data1>56</Data1> <Data2>100</Data2> ...

Indent text child nodes with javax.xml.transform.Transformer

Hello, I'm transforming a DOM document to XML in java using javax.xml APIs. The result is <tag> <tag2>text</tag2> </tag> but I need it to be <tag> <tag2> text </tag2> </tag> Are there any options to do that with text child nodes? I didn't find any ...

How to extract this date format in xslt

Hi All, I have an xml structure: <Date>Mon, 11 Aug 2009 13:15:10 GMT</Date> i want to extract only 13:15 or '13' and '15'. What is the best way to do that using xslt ...

XML facebook feed

Can I get an XML feed of my personal facebook news? Is there any existing Perl CPAN modules for parsing the XML feed? ...

How do I preserve special characters when writing XML with XDocument.Save()?

My source XML has the copyright character in it as &#x00A9;. When writing the XML with this code: var stringWriter = new StringWriter(); segmentDoc.Save(stringWriter); Console.WriteLine(stringWriter.ToString()); it is rendering that copyright character as a little "c" with a circle around it. I'd like to preserve the original code so ...