xml

How to migrate from XslTransform to XslCompiledTransform

I have the following code that I need to migrate from VS 2003 (.Net 1.1) to VS 2008 (.Net 2+) but I get compilation error - System.Xml.Xsl.XslTransform' is obsolete: This class has been deprecated. I probably need to use System.Xml.Xsl.XslCompiledTransform instead. but I do not find the matching Load() and Transform() overload versions...

xslt (table) by matching the attribute value.

I need to generate an xsl table for the xml below, for attributes fname and lname. I guess I have done something wrong in xpath. Could someone help me out by writing an xsl table for the xml below.. <sparql> <head> <variable name="s"/> <variable name="fname"/> <variable name="lname"/> </head> <results...

With jQuery and I need help getting individual table row titles attributes from an xml file

I'm usig tablesorter jQuery to parse this xml file <?xml version="1.0" encoding="iso-8859-1"?> <CATALOG> <CD> <TITLE>Title 01</TITLE> <ARTIST>Artist 01</ARTIST> <COUNTRY>Country 01</COUNTRY> <PRICE>10.00</PRICE> <YEAR>2010</YEAR> <INFO>Tooltip Info 01</INFO> </CD> <CD> <TITLE>Title 02</TITLE> <...

How do I prevent a pair of XMLEvent[Reader|Writer] from splitting empty tags into start+end tags?

Hello, everyone! I have an understanding problem of how the following code works: XMLInputFactory xif = XMLInputFactory.newFactory(); XMLOutputFactory xof = XMLOutputFactory.newFactory(); XMLEventReader reader = xif.createXMLEventReader(/* ... */); XMLEventWriter writer = xof.createXMLEventWriter(/* ... */); writer.add(reader); The...

xml vs java LinearLayout fills

the xml version below properly handles height and width and the java doesn't what is the java missing? xml <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_height="fill_parent" android:layout_width="fill_parent" android:orientation="horizontal"> <...

Using jQuery to parse an RSS feed, having trouble in firefox and chrome.

I used a jQuery library called jFeed to parse and display my blogs rss feed on my personal website. It worked perfectly well at first, but upon checking later it simply displays nothing, except in Internet Explorer, where it seems to work fine. After checking the javascript console using Firebug in Firefox, it shows an error in the 'XM...

How can I use R (Rcurl/XML packages ?!) to scrape this webpage ?

Hi all, I have a (somewhat complex) web scraping challenge that I wish to accomplish and would love for some direction (to whatever level you feel like sharing) here goes: I would like to go through all the "species pages" present in this link: http://gtrnadb.ucsc.edu/ So for each of them I will go to: The species page link (for ex...

How to create XSD schema from XML with this kind of structure (in .net)?

Here's the problem: my input is XML file that looks something like: <BaseEntityClassInfo> <item> <key>BaseEntityClassInfo.SomeField</key> <value>valueData1</value> </item> <item> <key>BaseEntityClassInfo.AdditionalDataClass.SomeOtherField</key> <value>valueData2</value> </item> <item> <key>BaseEntityClassInfo.AdditionalDataCla...

Saxon XSLT-Transformation: How to change serialization of an empty tag from <x/> to <x></x>?

Hello folks! I do some XSLT-Transformation using Saxon HE 9.2 with the output later being unmarshalled by Castor 1.3.1. The whole thing runs with Java at the JDK 6. My XSLT-Transformation looks like this: <xsl:transform version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:ns="http://my/own/custom/namespace/for/...

XML fix namespace declaration

Hi all, I am trying to detetct/work around this bug in RSS elements. That means I have to find a wrong namespace-declaration and change its value to the correct namespace. E.g: xmlns:media="http://search.yahoo.com/mrss" must be: xmlns:media="http://search.yahoo.com/mrss/" How can I achive that given a org.w3c.Document? I meanwi...

XML: When to use attributes instead of child nodes?

Possible Duplicates: XML Attributes vs Elements Should I use Elements or Attributes in XML? For tree leaves in XML, when is it better to use attributes, and when is it better to use descendant nodes? For example, in the following XML document: <?xml version="1.0" encoding="utf-8" ?> <savedGame> <links> <link rootTag...

Java SAX ContentHandler to create new objects for every root node

Hello everyone, I am using SAX to parse some XML. Let's say I have the following XML document: <queue> <element A> 1 </element A> <element B> 2 </element B> </queue> <queue> <element A> 1 </element A> <element B> 2 </element B> </queue> <queue> <element A> 1 </element A> <element B> 2 </element B> </queue> And I als...

xsl with javascript

I've a file with xml data. And I want to generate a report out of it. I tried to integrate xsl with java script, but can I get a handle of individual data elements in xsl and pass it on to a java script function. Lets say <value>true</value> is in the xml and I want to pass it on to a javascript function while doing something like this...

What is the fastest method to parse XML?

What is the fastest method(fastest performing) to parse an xml that is in a string, in Java platform ? The file size can be around say 25kb. The constraint is that I am not presented with an xml file, rather I have to parse the xml string !! ...

How to solve docbuilder SAX exception: unexpected end of document?

I have a service that gives some car information in an xml format. <?xml version="1.0" encoding='UTF-8'?> <cars> <car> <id>5</id> <name>qwer</name> </car> <car> <id>6</id> <name>qwert</name> </car> </cars> Now the problem that I'm having is that my DocumentBuilderFactory docBuilderFactory = Docume...

XSL Template - reducing replication

Hey Sorry about the extremely vague question title (any suggestions for improvements welcome) I have an XSL document that, currently, has lots of replication that I want to reduce. Here is the following XML snippet I am working with <Unit Status="alive"> I am currently using the following XSL to show images based on the status of ...

Parsing XML in Javascript getElementsByTagName not working

Hi, I am trying to parse the following XML with javascript: <?xml version='1.0' encoding='UTF-8'?> <ResultSet> <Result> <URL>www.asd.com</URL> <Value>10500</Value> </Result> </ResultSet> The XML is generated by a PHP script to get how many pages are indexed in Bing. My javascript function is as follows: funct...

Get image url from rss Cdata

Hi , I start testing android , trying to get image from xml my Image is hosting inside xmlnode <a href="http://www.site.com/id/?id=41564&quot;&gt;&lt;img src="http://www.site.com//news/images/2010/03_march/imagestock/thumb/22.jpg&quot; align="left" /></a> more text comes here i trying to get the http://www.site.com//news/images/2010/0...

PHP add node to existing xml file and save

Is it possible using php's XMLWriter to insert a new node to an existing xml file, and then save the file. This would be much more benficial to me that actually creating a enw file every time i want to update an xml file. ...

Generating Java classes from XML file

Hello, How can I get java classes from an xml file? In this situation, I don't have an XML schema and this way I can't use JAXB, Castor or other xml binding API as far as I know. ...