xml

C# - Parse malformed XML

I'm trying to load a piece of (possibly) malformed HTML into an XMLDocument object, but it fails with XMLExceptions... since there are extra opening/closing tags, and malformed XML tags such as <img > instead of <img /> How do I get the XML to parse with all the errors in the data? Is there any XML validator that I can apply before pars...

XSLT Tester

does anyone know of an online XSLT tester.. i.e. you provide the xml/xslt and it tells you the output... I know i could write one, but i'd like a solution that i have to write and that is available online.. (: ...

MarkupBuilder using list

I am currently using sql.row("statement") and storing to a list. I then am trying to setup my xml file using MarkupBuilder. Is there a better way than iterating over the list poping off an item and then parsing it to add my different column names and values? What is stored by list entry is ID='X' Period='Yearly' Lengh='test' So the ...

problems reading CDATA section with special chars (ISO-8859-1 encoding)

I am trying to read a xml stream and load it into a collection. This works but Im having difficulties reading special chars. E.g. if my xml looks like this <?xml version="1.0" encoding="ISO-8859-1" ?> <persons> <person> <firstname> <![CDATA[ Sébastien ]]> </firstname> <lastname> <![CDATA[Ørvåk]]> </lastname> </person> </...

Tracking namespace declarations with XMLWriter

Hi, I'm working on an XML webservice (in PHP!), and in order to do things 'right', I want to use XMLWriter instead of just concatinating strings and hoping for the best. I'm using XML namespaces everywhere using ->startElementNS and ->writeElementNS. The problem, is that every time I use these functions a new namespace declaration is a...

Convert SQL code that uses XML/XPath to VBScript (classic ASP)

I want to convert below SQL Server code to VBScript in classic ASP... DECLARE @idoc int DECLARE @xdoc nvarchar(4000) DECLARE @xmldoc xml Set @xmldoc = '<Root><Authors au_id="409-56-7008" au_lname="Bennet" au_fname="Abraham"><Titles title="The Busy Executive&apos;s Database Guide"/></Authors><Authors au_id="648-92-1872" au_lname="Blotche...

insert delet update xml file

Hey, I asked the almost the same question before also, but i have not yet been able to figure out how to solve this issue of mine. I have been assigned a project, in which I get a .xml file, which has field like, <TITLE>, <AUTHOR>,<ABSTRACT>, <COMMENT> and the <COMMENT> tag comes empty in the .xml, rest all the fields are already fil...

Putting date in front of xml file name

I have the following code: XmlSerializer SerializeObj = new XmlSerializer(dirs.GetType()); TextWriter WriteFileStream = new StreamWriter(@"G:\project\tester.xml"); SerializeObj.Serialize(WriteFileStream, dirs); WriteFileStream.Close(); I'm trying to put a date/time stamp in FRONT of the xml file name. Therefore, using this exam...

Oracle: loading a large xml file?

So now that I have a large bit of XML data I'm interested in: http://blog.stackoverflow.com/2009/06/stack-overflow-creative-commons-data-dump I'd like to load this into Oracle to play with. How can I directly load a large XML file directly into Oracle? Server-side solutions (where the data file can be opened on the server) and client...

Multiple element/attribute sorting in XSL

Hello Again, I am trying to sort several levels of data using a XSL document. I got it to work but it is using a bunch of recursion. I am trying to avoid this because I figured using multiple sorts withing a single node shold have worked. Is there a way to change the XSL below to be less recursive? I am sorting on USER/USERID, then R...

How can I get the order of an element attribute list using Python xml.sax?

How can I get the order of an element attribute list? It's not totally necessary for the final processing, but it's nice to: in a filter, not to gratuitously reorder the attribute list while debugging, print the data in the same order as it appears in the input Here's my current attribute processor which does a dictionary-like pass ...

Parsing XML structure without expanding entities in PHP

I'm trying to extract the structure of an XML document in PHP without expanding the entities within. I'm aware that entities are usually expanded before the structure is parsed, and that ignoring this means that the XML may not be well-formed, but I'm parsing XML fragments which might not include the normal XML document header, and so wi...

Is &#x10; a valid character in XML?

On this data: <row Id="37501" PostId="135577" Text="...uses though.&#x10;"/> I'm getting an error with the Python sax parser: xml.sax._exceptions.SAXParseException: comments.xml:29776:332: reference to invalid character number I trimmed the example; 332 points to "&#x10;". Is the parser correct in rejecting this character? ...

Serializing a DrawableGameComponent as XML using XNA's ContentTypeWriter class

I'm writing a small 2D shooter game in XNA, and I've decided that, so that one could implement custom made content in the game, it loads definitions of the game objects from XML files. When I found out that XNA has an easy to use XML serializer, it made it extra easy. The problem is, my objects that I want to serialize are DrawableGameCo...

SQL Server 2005 Xml Parameter Causing Timeout?

I'm trying to send a XML of aproximately 1MB as XML parameter in a Stored Procedure, but always the connection returns timeout. Anyone knows what's the size limit for the XML type? Environment: Microsoft SQL Server 2005 Express .NET Framework 2.0 C# C# Code: using (SqlCommand commandSave = new SqlCommand("SaveScanning", this.D...

xml.dom.minidom Document() in Python/django outputting memory location

I'm learning Python and django at the same time. I'm trying to create an xml document to return some XML from a view. I'm using the django development server at the moment and I keep getting this information spitting out in my views instead of the document I tried to create. Here's my code from django.http import HttpResponse from ...

What is the equivalent of "FOR XML AUTO" in MySQL? (for having an XML string that represents a row)

Hello! In SQL Server I frequently use "FOR XML AUTO", which allows something like "SELECT id FROM car FOR XML AUTO" to return "<car><id>1</id></car><car><id>2</id></car>". Is there a way to do this in MySQL? What I want is to be able to store this XML in another table so I can have complete log of changes made in the database. The hist...

How to get the xml content of a node as a string?

Using PHP's DOM functions, how do you convert a DOM Node's contents into a string? <foo> Blah blah <bar baz="1">bah</bar> blah blah </foo> Given foo as the current context node, how do you get 'Blah blah <bar baz="1">bah</bar> blah blah' as a string? Using $node->textContent or $node->nodeValue just returns the text nodes, not the...

How to sort xml data using classic asp(vbscript) with out xpath?

hi, this is my xml <rooms> <room> <roomname>Single</roomname> <roomid>1</roomid> <Price>100</Price> <Adult>1</Adult> <child>0</child> </room> </rooms> <rooms> <room> <roomname>Double</roomname> <roomid>2</roomid> <Price>200</Price> <Adult>2</Adult> <child>1</child> </room> </rooms> ...

Script stack space exhausted firefox

i am working with a large XMl response from a webservice. when i try to get that using a url, after sometimes it displaya an error in Firebug that "script stack space quota is exhausted" how can i solve that???? ...