xml

Is there any easy to use Javascript XML library recommend?

I parse data using JSON in javascript, I find this is very convenient. But when I using XML, I need to look down every nodes. It seems that the XML is more complex. Is there any Javascript for erase some plain on creating and reading xml document? plx recommend. ...

Python xpath not working?

Okay, this is starting to drive me a little bit nuts. I've tried several xml/xpath libraries for Python, and can't figure out a simple way to get a stinkin' "title" element. The latest attempt looks like this (using Amara): def view(req, url): req.content_type = 'text/plain' doc = amara.parse(urlopen(url)) for node in doc.x...

convert xml into table

I need to convert an oracle table into xml and then return it to table form. I converted a table using xmlgen, but I don't know how to reverse the conversion. I'm looking for an example of converting an xml file into a table. ...

struggling with XML namespaces (linq)... what am I doing wrong here?

Hi, Trying to parse some XML but apparently this is too much for a lazy sunday afternoon, this is my code: (I Tried the XPathDocument and XmlDocument approach too but this also failed miserably) XmlDocument xmlDoc = new XmlDocument(); xmlDoc.LoadXml(postData); XDocument xDoc = XDocument.Load(new XmlNodeReader(xmlDoc)); XNamespac...

"extend" an xml schema

I'm trying to "extend" an xml schema (nhibernate here, for example), to add my own entities inside of it. I'm stuck to the point where validation chokes on the "exm:foo" (and exm:foobar) entity, as the "base" schema doesn't allow it. How can I manage to do that, without changing the base schema ? Sample : <?xml version="1.0" encoding="...

Convert only certain xml characters to their HTML entities (&#nnn;)

I have a problem where I have some html like this <p>There is the unfinished business of Taiwan, eventual “reunification”...a communiqué committing</p> In that text string I would not want to change the < and > to & lt ; and ^ gt ; However I would want to convert the quotes around “reunification” and the é in communiqué. ...

How do I append a new item to a plist?

In my iPhone app, I have two plist files to store "Themes". One is a read-only file containing default themes, and one contains custom Themes that the user has created. I'm using plist files because it's very easy for me to read from the plist and create new Theme objects. My plist is an array of dictionary objects. Is there any easy w...

Any XML based alternative of TEX?

When I started to know about TEX, I found it a descrptive language. I think that any XML based alternative would do the job better. And everybody would not have the hassle of learning TEX. I found it quite time consuming. Does anyone know any XML based alternative like this? And if there is compatibility between that thing and XML (havin...

SQL Server 2005 Xquery namespaces

I'm trying to get some values out of an Xml Datatype. The data looks like: <Individual xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt; <FirstName xmlns="http://nswcc.org.au/BusinessEntities.Crm"&gt;Lirria&lt;/FirstName&gt; <LastName xmlns="http://nswcc.org.au/BusinessEntiti...

Tell SAX Parser to ignore invalid characters?

SAX keeps on dying on the following exception: Invalid byte 2 of 3-byte UTF-8 sequence The problem is its mostly correctly UTF-8 encoded but there are a few errors in it. We cannot get a new version of the file, we have to use this file. So how do we tell SAX to ignore invalid character sequences, or clean up the UTF-8 file so that i...

How to load xml from https using XmlTextReader

I am using System.Xml.XmlTextReader to read xml stream from a http location. Now I need support to read from a secure https site. How can I do this by providing user credentials in some way? ...

Is xmlns="" is a valid xml namespace?

Is an empty xml namespace is a valid value. If yes what does it means? I have XML which looks like following one but I'm not sure what namespace Field1 and Field2 belong to. <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"&gt; <soapenv:Header /> <soap:Body> <Root xmlns="uri"> <Field1 xmlns="">1...

C#, XML to Class DeSerialization Question

I have the following XML snippet: <dmFiles> − <dmFile dmUpFileGuid="" dmFileDescr="testcase01.pdf" dmFileMetaType="main" dmFileGuid="" dmMimeType="pdf" dmFormat=""> If I create a strongly typed C# class with string properties for the dmFile attributes (eg: dmFileDescr), how can I ensure these attributes will serialize to properties in...

C# XML deserialization problem

I have the following XML snippet: <?xml version="1.0" encoding="utf-8"?> <dmFiles> <dmFile dmUpFileGuid="" dmFileDescr="testcase01.pdf" dmFileMetaType="main" dmFileGuid="" dmMimeType="pdf" dmFormat=""> <dmEncodedContent></dmEncodedContent> </dmFile> </dmFile...

An invalid character was found in text content Error while reading xml in vb.net

Hi friends hope all r doing well. I have a problem while reading xml file in vb.net i.e. it is getting error "An invalid character was found in text content". I am loading the and saving using XmlDocument class. My xml file is as follows: <?xml version="1.0" encoding="UTF-8"?> <Job> <Job_ID>83795806</Job_ID> <PositionI...

DeSerialize XML into Class, Subclass & Properties making SubClass not null

I have some XML that I am de-serializing and all works fine apart from one of my properties in the serialized class is also a class for example; Person.Address.Postcode. Address is a property in Person class but Address is a class with properties such as Postcode. If the incoming XML does not contain Address information and deserializa...

How to insert XUL into a XHTML document

I have a XHTML document and wnat to embed XUL widgets into the document. What is the correct XML syntax to do so? <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"&gt; <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <meta http-equiv="Content-Type" co...

Missing <?xml version="1.0" encoding="XXXXX"?> after transformation

I am facing a problem after transformation of an XML file and saving it, i.e. I'm not getting the XML file top tag <?xml version="1.0" encoding="utf-8"?>. Below is my XSLT file: <?xml version="1.0" encoding="utf-8"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:output method="xml" indent="yes" ...

Sending and receiving XML Data

Hello, I am a .NET begginer and i'm trying to develop a webservices using C# so i can send a XML data to an specific URL. I can't use Web Reference and i need to construct the xml data using this kind of format: <?xml version="1.0" encoding="UTF-8"?> <soap-env:Envelope xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/"&gt; <so...

Transforming XML in ISO-8859-1 to HTML

I have an XML document that I'm transforming using XSL and then spitting out directly into an HTML document (all server side). Everything works OK functionally but special characters (specifically the © symbol -- these are ads and many have © symbols) don't show up right (IE shows ? and FF shows a diamond with a ? inside). Obviously so...