xml

Recursively parse XmlDOcument

I have an XML document as follows: <directory> <file><monitored>0</monitored> <xferStatus>1</xferStatus> <name>test1.txt</name> <size>7</size> <created>03/31/10 11:30:02 AM</created> <modified>03/31/10 11:30:00 AM</modified> <tPathList><tPath>http://hwcdn.net/p2f4h2b5/cds/testing/test1.txt&lt;/tPath&gt; </tPathList> <tPath>http://hwcdn....

How to Create Element in XSLT When Copying Using Templates

Hello, I'm trying to create an element in an XML where the basic content is copied and modified. My XML is something like <root> <node> <child>value</child> <child2>value2</child2> </node> <node2>bla</node2> </root> The number of children of node may change as well as the children of root. The XSLT should copy the wh...

Good references for an overview of the Java XML ecosystem?

The java xml ecosystem seems awash in current implementations, API definitions and libraries all with cryptic names. (Web searches frequently turn up references to old/out-of-date implementations as well.) To list just some of the terms out there (by no means exhaustive): Crimson, Xerces, Xalan, JDOM, Saxon, XOM, JAXP Are there any goo...

Problem in using xpath with xslt having distinct values

I have XML like, <items> <item> <products> <product>laptop</product> <product>charger</product> <product>Cam</product> </products> </item> <item> <products> <product>laptop</product> <product>headphones</product> <product>Photoframe</product> </products> </item...

An error has occurred opening extern DTD (w3.org, xhtml1-transitional.dtd). 503 Server Unavailable

I'm trying to do xpath queries over an xhtml document. Using .NET 3.5. The document looks like this: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt; <html lang="en" xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <head> .... </head> <body> ...

XML RSS to HTML parser doesn't work

I'm using MCX (I don't even know if someone here is familiar with it, pretty unkown derivate of COBOL and Fortran, look it up in google when you don't believe me) Note: I'm using MCX on the MCX-WebServices server as it does neither support apache or ISS, mabye that is one problem. The thing is that I want to use the XML library to read...

How to modify exiting XML file with XmlDocument and XmlNode in C#

I already implemented to create the XML file below with XmlTextWriter when application initialization. And know I don't know how to update the childNode id value with XmlDocument & XmlNode. Is there some property to update the id value? I tried InnerText but failed. thank you. <?xml version="1.0" encoding="UTF-8"?> <Equipment xmlns...

XML : how to remove all nodes which have no attributes nor child elements

I have a xml document like this : <Node1 attrib1="abc"> <node1_1> <node1_1_1 attrib2 = "xyz" /> </ node1_1> </Node1> <Node2 /> Here <node2 /> is the node i want to remove since it has not children/elements nor any attributes. ...

View a SYS.XMLTYPE returned from an Oracle function, using PL/SQL

I have an Oracle function that dynamically creates an XML document, and returns it in a SYS.XMLTYPE value. I want to run a query from SQL Developer that calls that function and prints the document (either via a select, or dbms_output - I don't care). But all the examples/documentation seem to refer to querying XML columns in tables, an...

Android, sending XML via HTTP POST (SOAP)

Hi, I would like to invoke a webservice via Android. I need to POST some XML to a URL via HTTP. I found this snipped for sending a POST, but i dont know how to include/add the XML data itself. public void postData() { // Create a new HttpClient and Post Header HttpClient httpclient = new DefaultHttpClient(); ...

How to create temporary files on the client machine, from Web Application?

I am creating a Web Application using JSP, Struts, EJB and Servlets. The Application is a combined CRM and Accounting Package so the Database size is very huge. So, in order to make Execution faster, I want prevent round trips to the Database. For that purpose, what I want to do is create some temporary XML files on the client Machine an...

iPhone XML SOAP requests or .NET Web Services

I've been trying to to consume SOAP requests (.NET web services) and have found some pretty good tools that I wanted to share: 1) http://grabalife.com/2009/10/19/using-net-web-services-and-dataset-objects-in-your-iphone-app/ Really easy clean way to perform all the call needed for consuming the services. 2) http://code.google.com/p/m...

I need to parse non well-formed xml data (HTML)

Hi, I have some non well-formed xml (HTML) data in JAVA, I used JAXP Dom, but It complains. The Question is :Is there any way to use JAXP to parse such documents ?? I have a file containing data such as : <employee> <name value="ahmed" > <!-- note, this element is not closed, So it is not well-formed xml--> </employee> ...

How to avoid Eclipse leaks on XServer when editing Android XML files?

When I'm editing XML files in Eclipse (mainly, Android layouts and so), it causes leaks on XServer and it ends eating all my RAM (4GB), so I have to Ctrl+Alt+Backspace to continue. Do you know any remedy for that? Thank you! ...

View XML to be sent over web reference via Visual Studio

Could someone tell me how to view the XML to be sent via web reference while debugging Visual Studio (i.e. see the actual XML with all tags too?) I'm having a "There is an error in this XML Document (4, 56)." error. Any help would be much appreciated. ...

DTD (or XSD) problem with duplicate name element having different scopes

Hello, I extracted a xml fragment on which I am working for a DTD, pratically I need a specific declaration for resource contained in tag resources and another different one for resource contained in tag input. The problem is that the first one requires the id attribute, the second one does not require the id attribute because uses alte...

.NET: Is there a way to finagle a default namespace in an XPath 1.0 query?

I'm building a tool that performs xpath 1.0 queries on XHTML documents. The requirement to use a namespace prefix in the query is killing me. The query looks like this: html/body/div[@class='contents']/div[@class='body']/ div[@class='pgdbbyauthor']/h2[a[@name][starts-with(.,'Quick')]]/ following-sibling::ul[1]/li/a (all on o...

Add/remove xml tags using a bash script.

I have an xml file that I want to configure using a bash script. For example if I had this xml: <a> <b> <bb> <yyy> Bla </yyy> </bb> </b> <c> <cc> Something </cc> </c> <d> bla </d> </a> (confidential info removed) I would like to write a bash script that will rem...

Android InstrumentationTestRunner XML output for Hudson ingestion

I have an Android test project that I'd like to link into Hudson, but I haven't found a way to output the test results as XML instead of text. Does anyone know if there's an easy way to do this already? -Dan ...

Set specific font in a styles.xml

Hi, I'm defining a style XML for my android app. I have some TTF files I want to use, how can I set the typeface to use those files as the font as opposed to the generic "sans", "serif" & "monospace". Thanks ...