xml

XSLT: Using parent node's namespace

I would like to avoid producing a repeated namespace in my XSLT output. (I am using XSLT to massage some XML so that Microsoft's DataContractSerializer sees fit to actually process it properly. One of the things that the DCS doesn't seem to like is defining the same namespace multiple times.) I am taking all of the "Characteristics" el...

Sending NSDictionary between phones

I have an application where a user creates settings that are stored in an NSMutableDictionary. I have to send this to a server, where it can be later retrieved by a recipient. I can serialize the dictionary, and send it to the server. My question is, if I send it as NSData, store it in a blob field in my postgresql db, and then send it...

Error when merging two XML documents using XPath & DOMDocument ...

Hi, everyone. About a year ago I wrote a jQuery-inspired library which allowed you to manipulate the DOM using PHP's XPath and DOMDocument. I recently wanted to clean it up and post it as an open source project. I've been spending the past few days making improvements and implementing some more of PHP's native OO features. Anyhow, I th...

Are there other languages similar in purpose to XML?

I ask this because i find XML to be visually unappealing. I understand that XML is extremely famous, useful, and that it is accepted by most, if not all, programmers as a very useful language for defining and structuring data; however, i really do not find staring at it, looking at it, or reading it very appealing. I'm just a student and...

parseerror when getting XML via jQuery AJAX

I want to pull an RSS feed via jQuery AJAX, but every time I do, I get a parsererror. My feed is relatively complex (using CDATA and custom namespaces), so I tried stripping down the document returned (along with a million other combinations), but even with an extremely simple document, it still fails. This is my AJAX code: $.ajax({ ...

Problem in using stream reader

I have XML data as a string which has to parsed, I am converting the XML string to inputsource using the following code: StringReader reader1 = new StringReader( xmlstring); InputSource inputSource1= new InputSource( reader ); And I am passing input source to Document doc = builder.build(inputSource); I want to use the same inputS...

Get XmlNode Open Tag with Attributes

Is it possible to get the open tag from a XmlNode with all attributes, namespace, etc? eg. <root xmlns="urn:..." rattr="a"> <child attr="1">test</child> </root> I would like to retrieve the entire opening tag, exactly as retrieved from the original XML document if possible, from the XmlNode and later the closing tag. Both as stri...

Parse XML using JQuery in Safari

Hi there. I've got the following below XML and would like to parse this with JQuery in Safari web browser. I just want to print out the userName and need some assistance with how the function would be written. <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <ns3:Account xmlns:ns2="http://oec.api.opsource.net/schemas/organizatio...

Preventing referenced assembly PDB and XML files copied to output

I have a Visual Studio 2008 C#/.NET 3.5 project with a post build task to ZIP the contents. However I'm finding that I'm also getting the referenced assemblies' .pdb (debug) and .xml (documentation) files in my output directory (and ZIP). For example, if MyProject.csproj references YourAssembly.dll and there are YourAssembly.xml and Yo...

XPath where the requirements apply to deeper nodes than the ones in resulting set

In my answer to another post in SO (here: http://stackoverflow.com/questions/1948552/sharepoint-2007-how-to-check-if-a-folder-exists-in-a-document-library/2005855#2005855) I had to parse an XML document with structure: D:multistatus |--D:response |----D:propstat |-------D:prop |----------D:displayname |----------D:isFolder Is it possi...

Format XML Document created with PHP - DomDocument

I am trying to format visually how my XML file looks when it is output. Right now if you go here and view the source you will see what the file looks like. The PHP I have that creates the file is: (Note, $links_array is an array of urls) header('Content-Type: text/xml'); $sitemap = new DOMDocument; // create r...

Java: How to display an XML file in a JTree

Hi, I would like to have a way to display the contents of an XML file in a JTree. I have already accomplished this using DOM, by implementing a custom TreeModel (and TreeCellRenderer). However it is very clunky (much workaround-ery and hackery) and rather rough around the edges. Is anyone aware of a way to get a JTree to display the co...

Java: Ways to parse XML in E4X?

Hi, I was wondering if there was a way to parse XML using E4X, or something similar to E4X. Does such a framework / library exist? Thanks! ...

Android XML parsing

hi friends... a strange problem has cropped up... I checked several websites but couldnt find anything wrong with the code... But it returns NullPointerException... try{ SAXParserFactory f = SAXParserFactory.newInstance(); SAXParser parser = f.newSAXParser(); XMLReader reader = parser.getXMLReader(); reader.setContentHan...

SAXParseException in android

I am following the book "Professional Android Application Development" and trying to code some example. In chapter 5 page 151, the following code throw SAXParseException. Does any one know why? ... Document dom = db.parse(in); .... I tried other xml files, same exception was thrown. ...

Problem with displaying line chart from xml data

I have something like this xml data <data> <result month="Jan-04"> <employee id="1"> <a>81768</a> <b>60310</b> <c>43357</c> </employee> <employee id="2"> <a>81768</a> <b>60310</b> <te>43357</c> </employee> </result> <result month="Feb-04"> <employee id="1"> <a>8...

Ruby Unit Test : Is this a Valid (well-formed) XML Doc ?

I'm creating an XML document: I want to unit test at least to make sure it's well-formed. So far, I have only been able to approximate this , by using the 'hasElements' in the REXML library. Is there a better way ? Preferably using built-in libraries (I mean libraries that ship with the standard Ruby 1.8.x distro). require "test/unit"...

How to search a keyword in XML and scroll down the window to it?

Thanks to Bishiboosh and fmsf. As suggested, we're going to do it through XSL which looks more obvious answer of the problem (for detail please read below question). We'd have to create an XSL which will search a keyword and match with node name/value, attribute name/value etc. everything in XML. XML <?xml ver...

Linq to XML - Adding an Element

I am trying to add and delete elements from a C# .csproj file. The file, in part, appears below. Can someone show me how I can do the following two things? 1) Add an element as shown below (the line that says, "I want to add this") 2) Delete an element. For example, say I wanted to delete the line I have indicated below. <?xml version...

converting a raw file into xml file

Hello guyz, I'm working on a project under which i have to take a raw file from the server and convert it into XML file. is there any tool available in java which can help me to accomplish this task like JAXP can be used to parse the XML document ??? Thanks in Advance.... ...