xml

Most elegant way to query XML string using XPath

I'm wondering what the most elegant way is in C# to query a STRING that is valid xml using XPath? Currently, I am doing this (using LINQ): var el = XElement.Parse(xmlString); var h2 = el.XPathSelectElement("//h2"); ...

Display XML island

I am using javascript with several XML islands. One of my islands is coming back null and it is when it is being loaded by another Island. I was hoping someone knew of a way to display what is in these islands. Everything is in a xhtml file with xslt files assisting it. Island1.XMLDocument.loadXML( Island2.XMLDocument.xml ); Island1 i...

Convert String to XML Document in JavaScript

Saw this example on the jQuery examples page for Ajax: var xmlDocument = [create xml document]; $.ajax({ url: "page.php", processData: false, data: xmlDocument, success: someFunction }); How do I take a string like: var t = '<foo><bar>something</bar></foo>'; And convert that to a XML DOM object? cross-browser? UPDA...

Unpredictable hierarchy in JSON object...

When building an ajax application, I normally prefer fetching remote data in JSON format. However, when the hierarchy is unpredictable (specifically geocoding responses from Google Maps API), it is tempting to go with XML format because the DOM method getElementsByTagName will get the data wherever it is in the hierarchy. Assuming there ...

Java XML parsing using DOM to get nodevalue

try { String data = "<a><b c='d' e='f'>0.15</b></a>"; DocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactory .newInstance(); DocumentBuilder documentBuilder = documentBuilderFactory .newDocumentBuilder(); InputSource is = new InputSource(); is.set...

Is there a GUI that I can use to create XML documents based on my schema?

Hi all, I want to create a simple graphical user interface to allow non-technical users to create an XML file without having to manually edit the XML source. Ideally I'd like a drag and drop interface, but failing that, anything really. The contents of the XML file are similar to an encoded flow chart of a binary tree, so maybe somethin...

Validate XPath expression

I would like to validate a user-provided XPath query to ensure that it is syntactically correct. Does it make sense to "validate" an XPath query without an XML document? How can i achieve such a thing in libxml? ...

Can XmlDictionaryReader really handle binary XML? If not, what does?

I'm trying to write a debugging tool that allows the user to view WCF's new binary XML format (application/soap +msbin1) in plain text. Once I found the XmlDictionaryReader class I thought I'd be done in minutes, but it's not working as expected. private string DecodeBinaryXML(byte[] binaryBuffer) { if (binaryBuffer == null) ...

Property missing error when I add a new static event on Silverlight

HI there, I have added a static event with the following code: public class TypeChangedEventArgs : EventArgs { public Types TypeSelected { get; set; } } public delegate void TypeChangedHandler(TypeChangedEventArgs eventArgs); public static event TypeChangedHandler TypeChanged; And I do get an event handler for TypeChanged, the...

google python data example: pizza party

hey i started learning python and am quite confused as how the google data library works. google has a pizza party example over at this link can anyone here please take the time to explain how it is being done. i would be so grateful. WHAT I UNDERSTAND: <entry xmlns='http://www.w3.org/2005/Atom' xmlns:p='http://example.com/pizza/1.0'&...

XML items to Form Select Menu (in php?)

Hi all, I was wondering if anyone knows how to get information from an XML file and turn it into a form select/list using php.. This is the XML schema: <?xml version="1.0" encoding="utf-8"?> <expose version="2.1"> <collection _mngid="1"> <collection _mngid="1"> <title>Heatherton Football Club</title> <thumb> <...

Crystal Report using XML

I am using Crystal Report 9.0 (Can't upgrade due to some constraints) My application is in classic ASP using ADO My application will retrieve XML data from a Web Service exposed by a service provider and i need to generate a Report using this XML data. Is there any way to do so? Thx in Advance ...

Using SimpleXML to get twitter avatar url (weird)

Im using simplexml to get the twitter profile avatar url from the xml status page. this is the code im using <? $username = twitter; $xml = simplexml_load_file("http://twitter.com/users/".$username.".xml"); echo $xml->user->profile_image_url; ?> The xml page loads when i visit it, but for some reason nothing is being echoed. No error...

How can I Read xml file in C# using HTTP connection in windows mobile SDK 6

Hi, I am trying to read xml file using HttpWebRequest. But not getting success it gives me error. If I want to parse the xml wich i can get by posting the data to server then how I can parse it? Thanks in Advance ...

Selecting the two elements with the lowest attribute values and merging them into one element in the output

Using xslt/xpath, I need to be able to select the two elements which have the lowest attribute value and merge them, in a way. Lets say for example I have: <root> <integer val="14"/> <integer val="7"/> <integer val="2"/> <integer val="1"/> <integer val="4"/> <integer val="8"/> </root> I want to select the two lowest values (1 a...

How to Implement Ajax to display some content in php?

I want to create a page which displays some contents when left navigation menu is clicked. For Eg. When MY FAVOURITE VIDEOS is clicked then the list of the users favourite videos should be displayed on the right side using AJAX. Help me ...

XML Namespaces are confounding me

I have an XML document which is confounding me. I'd like to (to start) pull all of the document nodes (/database/document), but it only works if I remove all of the attributes on the database element. Specifically the xmlns tag causes an xpath query for /database/document to return nothing - remove it, and it works. xmlns="http://www....

E4X: Insert nodes in XMLList for missing date?

if I have an XML object like this: <a> <u date="2009-04-10" value="543"/> <u date="2009-04-11" value="234"/> <u date="2009-04-13" value="321"/> <u date="2009-04-14" value="66"/> <u date="2009-04-16" value="234"/> <t date="2009-04-01" value="43"/> <t date="2009-04-02" value="67"/> <t date="2009-04-03"...

trying to parse weird formatted xml in php

I am trying to chop XML data into usable strings to reuse them later on in my script. I am receiving the data via a Curl request and his goes great. now chopping the data kills me.. this a part of the XML I am receiving (the whole data part is about 90 lines) <professions> <skill key="IT Specialist" maxage="40" group="IT" worked="...

Getting DOM tree of XML document

Does anyone know how I would get a DOM instance (tree) of an XML file in Python. I am trying to compare two XML documents to eachother that may have elements and attributes in different order. How would I do this? ...