xml

How to convert records in a table to xml format using T-SQL?

I've got a simple table and want to store its content into a xml on the harddrive. There should be one root element for the whole table, one element per table row and one child element per table column. What possibilities do I have? Thanks a lot Tomas ...

Handling complex XML

I need to handle a lot of incoming XMLs which may be rather complex. A typical situation is the following: <SomeNode> <Request> <Id>1</Id> <!-- Request specific stuff --> </Request> <Request> <Id>2</Id> <!-- Request specific stuff --> </Request> <Response> <Id>1</Id> <!-- Feedback on request no. 1 --> ...

Using StringWriter for XML Serialization

I'm currently searching for an easy way to serialize objects (in C# 3). I googled some examples and came up with something like: MemoryStream memoryStream = new MemoryStream ( ); XmlSerializer xs = new XmlSerializer ( typeof ( MyObject) ); XmlTextWriter xmlTextWriter = new XmlTextWriter ( memoryStream, Encoding.UTF8 ); xs.Serialize ( x...

hi all, i am writing an xml to store data, can anyone tell about default type of attribute?

<xs:element name ="ID"> <xs:complexType> <xs:simpleContent> <xs:attribute name="OFFSET" type="U8" fixed="00"/> </xs:complexType> </xs:simpleContent> However i want to make OFFSET greater than 1024 .in that case i get error 1024 invalid value for atomiv'U8' i tried defining OFFSET in following manner <x...

Tool for displaying binary decision tree

The system I'm currently working on involves the creation of binary decision trees. Lots of them. Some of them are stored in XML format so they can be analyzed manually if needed. The tree structure is basically nested <NODE> tags. Each node may also have a few child tags defining the properties of the node. What I would like to do is ...

Schema validation error "Duplicate named <element> : name = 'X'"

I'm trying to use the IXMLDOMDocument2 interface (C++) to validate an Xml document against some schema and I'm getting the following error: Duplicate named <element> : name = '{http://www.site.com/MySchema}envelope'. I'm struggling to understand what this means - is there a problem with my schema, or is this a problem with the Xml? I'...

How to search for a node using Linq to XML Query?

Below the xml doc <Root> <Global> </Global> <local> <section name="A"> <subsection name="A"> <innersection name="A"> <Property1> </Property1> </innersection> <innersection na...

Finding a text node in xml using xpath problem

I'm using rails and the Nokogiri parser. My xml is as below and I'm trying to get the 'Biology: 08:00' text into my view. <rss version="2.0"> <channel> <item> <title>Biology: 08:00</title> <description>Start time of Biology</description> <pubDate>Tue, 13 Oct 2009 UT</pubDate> </item> ...

How to build XmlNodes from XmlReader

I am parsing a big number of big files and after profiling my bottleneck is: XmlDocument doc = new XmlDocument(); doc.Load(filename); This approach was very handy because I could extract nodes like this: XmlNodeList nodeList = doc.SelectNodes("myXPath"); I am switching to XmlReader, but When I find the element I need to extract I a...

SWF file not loaded from cache when accessed from different pages in the website?

I have a flash gallery that uses a dynamic swf file to load data from xml and load images. This same swf files is used over several times for different clients in the portfolio section. But now it apears that the swf is loaded everytime a different client is clicked even though they all access the same swf file, any ideas? ...

Pulling out a full node with child nodes using XPath

I'm using XPath to select an section from an HTML page. However when I use XPath to extract the node, it correctly selects only the text surrounding the HTML tags and not the HTML tags themselves. Sample HTML <body> <div> At first glance you may ask, &#8220;what <i>exactly</i> do you mean?&#8221; It means that we want ...

Getting XML data from 3rd function?

I can I get the XML data from 3rd function? package { import flash.display.*; import flash.events.*; import flash.net.*; public class main extends MovieClip { private var myXML:XML; private var myXMLlist:XMLList; private var myLoader:URLLoader = new URLLoader(); public function main():void { loadData(); 3rdfunction(); } pri...

Name XML result column of TSQL "for xml explicit"?

I have a query that uses for xml explit to return XML result. select ... from ... order by [BatchType!1!TypeName], [FormType!2!TypeName], Tag, Parent for xml explicit, root('ClientImages') But the name of resultant column name is something as cryptic as Is there a way to change the column name? [ANSWER] I had a several nested ...

Application to view large XML file quickly?

We have a 120MB XML file that we want to view. Opening it in IE brings my machine to a crawl. I guess IE is loading the whole file into memory. Is there a tool to view this in a faster manner? Ideally a Windows GUI based tool. Would be nice if you could drill down through the data by collapsing/uncollapsing elements. Textpad works ...

How to create XML containing namespace declarations and prefixed names with an XmlDocument?

I am struggling to output the following XML using the XmlDocument object in .NET. Any suggestions? This is what I would like to output... <l:config xmlns:l="urn:LonminFRConfig" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:LonminFRConfig lonminFRConfigSchema.xsd"> </l:config> The namespace...

validate xml against dtd using python on google app engine

I've got validation working on client side using lxml, but I'm not quite sure how to get it work on google app engine, since it doesn't have the lxml package. I tried copying the whole lxml folder and place it in the root of my google application, but it seems like it cannot use it properly. I'm guessing it has to do with the compiled .s...

Why is BeautifulSoup modifying my self-closing elements?

This is the script I have: import BeautifulSoup if __name__ == "__main__": data = """ <root> <obj id="3"/> <obj id="5"/> <obj id="3"/> </root> """ soup = BeautifulSoup.BeautifulStoneSoup(data) print soup When ran, this prints: <root> <obj id="3"></obj> <obj id="5"></obj> <obj id=...

How can I view a text representation of an lxml element?

If I'm parsing an XML document using lxml, is it possible to view a text representation of an element? I tried to do : print repr(node) but this outputs <Element obj at b743c0> What can I use to see the node like it exists in the XML file? Is there some to_xml method or something? ...

In KML What Makes a Line String Have Multiple Geometries?

I know this is a total newbie question, but I happen to be a total newbie when it comes to KML. I am working on a GIS project using KML and I keep running into this multiple geometry issue. I want to programmatically determine when I need to encapsulate my <LineString /> points in a <MultiGeometry /> tag and when I don't. Is it when a...

Python's libxml2 can't parse unicode strings

OK, the docs for Python's libxml2 bindings are really ****. My problem: An XML document is stored in a string variable in Python. The string is a instance of Unicode, and there are non-ASCII characters in it. I want to parse it with libxml2, looking something like this: # -*- coding: utf-8 -*- import libxml2 DOC = u"""<?xml version="1...