xml

on error is it possible to ignore exception?

how do i ignore exceptions in c#? i am reading a remote xml file, and sometimes the tag doesnt exist and it throws an exception. how do i ignore the exception and goto next? ...

How to add an unique valued attribute to every tag in the xml using XSL

I want to add a unique attribute say "ind" to every tag in the xml. How do i do it using xsl. It need'nt be a sequence number. As long it is unique for every tag it is sufficient. ...

How can Perl's XML::Simple ignore HTML embedded in XML?

I have an XML file that I am pulling from the web and parsing. One of the items in the XML is a 'content' value that has HTML. I am using XML::Simple::XMLin to parse the file like so: $xml= eval { $data->XMLin($xmldata, forcearray => 1, suppressempty=> +'') }; When I use Data::Dumper to dump the hash, I discovered that SimpleXML is pa...

How can I add my desired links to be read using PHP Universal FeedParser

Hello, I have been trying to use the PHP Universal FeedParser to read RSS feeds and display the output on my site. Problem is I am VERY green with this and although it seems very simple. the only link that is working is the link provided in the sample. When I try to add another address with the xml or rss.php extensions, I keep getting e...

How to parse a xhtml ignoring the DOCTYPE declaration using DOM parser

Hi I face issue parsing xhtml with DOCTYPE declaration using DOM parser. Error: java.io.IOException: Server returned HTTP response code: 503 for URL: http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd%20 Declaration: DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional...

Where to locate the unattend.xml schema

I'm in need of a way to modify an unattend.xml file programmatically. It would be great if I could just serialize to and from an object. But to do so I would need to get a hold of the schema so that I can run it through XSD. The referenced link provides all the possible settings but it would be nice to have it in XSD format. Any ideas? ...

remove xml tags with XSLT

Hello all I have the following xml file: <xfa:data> <form1> <Page1> <Page2> <contractInfo> ... </contractInfo> <paymentInfo> ... </paymentInfo> </form1> <commercialType> .... </commercialType> <userList> ... </userList> <officesList> ... </officesList> <commercialType> .... </commercialType> <userLi...

Insert a doctype into an XML document (Java/ SAX)

Imagine you have an XML document and imagine you have the DTD but the document itself doesn't actually specify a DOCTYPE ... How would you insert the DOCTYPE declaration, preferably by specifying it on the parser (similar to how you can set the schema for a document that will be parsed) or by inserting the necessary SAX events via an XM...

Build a JavaScript wrapper for a rails-generated XML API?

I am working with a large website written in Ruby on Rails. Thanks to the support for REST in Rails 2, the site's business logic is all accessible via a consistent XML API. Now I want to be able to easily write one or more JavaScript frontends to the site that interact with the generated Rails XML API. Ideally, an automated wrapper for ...

How to add an XML parameter to a stored procedure in C#?

I am developing a C# web application in VS 2008 which interacts with my Adventureworks database in my SQL Server 2008. Now I am trying to add new records to one of the tables which has an XML column in it. How do I do this? This is the error I'm getting: System.Data.SqlClient.SqlException was caught Message="XML Validation: Text nod...

WPF and LINQ to XML databinding to a listbox problem

Hi, I'm having trouble correctly binding a listbox to an XML datasource (text .xml file). I'm learning how to use WPF and LINQ to XML by following the Microsoft example with the books list, which binds to an inline XML source, shown here... http://msdn.microsoft.com/en-us/library/bb669149.aspx What I am trying to do is change this a...

ruby on rails xml builder question

Anybody know how to produce an xml element like this in rails using xml Builder? <image:loc>http://example.com/image.jpg&lt;/image:loc&gt; xml.image :loc http://example.com/image.jpg Is supposed to work but doesn't. ...

XML how to check if node is returning null?

i have this code in c# doc.SelectSingleNode("WhoisRecord/registrant/email").InnerText how can i check whether it is returning null? ...

PHP Getting XPath of a DOMNode

I am creating an XML document on the fly. and I need to know the XPath of the Node I've just created. I don't see any such function like DOMNode::calculateXPath(void):string and I am not willing to write one by my own. is there any known lite 3rd party Solution ?? ...

Problem parsing a soap response (iphone / touchxml)

Hi I make a webservice and it works, the problem is with the webservice response. I have this xml (and i want to parse with touchxml), the problem is with touchxml that it founds two xml, one inside the other and it make crash. Here is my question, how i can parse this xml? how i can remove all the stuff like soap-env, xmlns .... <?xml ...

Can I use a static variable from a Java class in res/values/styles.xml?

I want to refer to a static Java variable in my styles.xml, is that possible? Here's a pseudo-xml example: <style name="Artwork"> <item name="android:background">@drawable/border_{Constants.MY_COLOR}</item> </style> ...

PHP DOMXml XPath of recursive Xpointer

My xml document reflects an Object. as referential Recursion is possible in objects and arrays. I need to reflect that in reproduced XML Structure too. Currently I am using Unique IDs to identify each node separately and a node like <recursion refer="IDREF"> and specifying the ID of the referenced Element. But in This way I need My Own C...

Add rss xmlns namespace definition to a php simplexml document?

I'm trying to create an itunes-valid podcast feed using php5's simplexml: <?php $xml_string = <<<XML <?xml version="1.0" encoding="UTF-8"?> <channel> </channel> XML; $xml_generator = new SimpleXMLElement($xml_string); $tnsoundfile = $xml_generator->addChild('title', 'Main Title'); $tnsoundfile->addChild('itun...

How to read data from SQL database and store it into an XML file ?

I have a Silverlight application that reads its content from an XML file. User can enter data and It'll be stored in SQL database. How can I read the data from SQL database and store it into an XML file ? Thanks, ...

How to add a hierarchical tag in an XML file though XSL?

I am facing a problem in XML transformation. The XML tag hierarchy is as follows: <Pick_Slips_Detail_Lines_S3> <Header_Custom_Section_S15> //This tag contains the header data (Example:Pick Slip Number) </Header_Custom_Section_S15> Then the Detail lines are printed. </Pick_Slips_Detail_Lines_S3> <Pick_Slips_Detail_Lines_S3> The detail l...