xml

Is there a way to convert an IEnumerable into a collection of XElements?

I'm trying to persist an XML file to disk using LINQ. I have a class of business objects including collections of strings (List) that I want to convert into XML. Is there a simple, one liner to convert this list into a list of XML Elements? For example, my list may be: List<string> collection = new List<string>() {"1", "2", "3"} The ...

What are some good C++ resources for effectively using Apache XML Security?

I'm looking for some resources that allow me to understand how to use this library, particularly for signing XML. Most of what I found out there is Java related, and I would prefer to get documentation/FAQs/tutorials on the C++ library. ...

How does one parse an XML document after first validating against a DTD in VB6.

I am attempting to write a XML parser in VB6. The standards that the XML is based off of comes with a DTD to verify the XML before you begin parsing. I have also written a sample XML file so that I have something with which to test. I am able to load the XML via the vb6 code Dim objXMLDoc As MSXML.DOMDocument Set objXMLDoc = New MSXM...

SQL Server won't perform regular expression validation on XML column

Hi I have an XML column in my table which contains this xsd snippet: <xsd:element name="Postcode" minOccurs="0"> <xsd:simpleType> <xsd:restriction base="xsd:string"> <xsd:pattern value="^[0-9]{4}$" /> </xsd:restriction> </xsd:simpleType> </xsd:element> The regular expression should require a string...

How to use msxml with Visual Studio 2008 Express (no ATL classes) without becoming crazy?

It is not really a question because I have already found a solution. It took me a lot of time, that's why I want to explain it here. Msxml is based on COM so it is not really easy to use in C++ even when you have helpful classes to deal with memory allocation issues. But writing a new XML parser would be much more difficult so I wanted ...

<, > in xml document

Hi there, when I try to insert signs like < oder > in an InnerText-part of a xml-tag then after accessing the xml by xmlDocument.InnerXml these signs are replaced by their html-code like &lt oder &gt, can someone explain this to me and perhaps give me a solution for this problem? with kind regards Sebastian ...

How to get the unparsed entity attribute's value from XSLT?

I have a problem with XSLT and unparsed entity in XML. Here is a fictional scenario. First I got an XML file named doc.xml: <?xml version="1.0" encoding="UTF-8" standalone="no"?> <!DOCTYPE document [ <!ELEMENT document (employee)*> <!ELEMENT employee (lastname, firstname)> <!ELEMENT lastname (#PCDATA)> <!ELEMENT firstname (#PCDATA)> <!...

In C# What is the best way to parse Large XML (Size of 1GB)...?

I am having a 1GB XML File and want to parse it.If i use XML Textreader or XMLDocument ,result is very slow and some times hangs ...Your answers are welcome ...

XML tree printer?

Is there a program that will print a nicely formatted tree from XML data? I am working on a B+ tree programming assignment for class and it would greatly help if I could visualize the tree. It wouldn't be too hard to output my internal data structure to XML (see below) if there was a program that would render it. ...

Root namespace missing in DataSet.WriteToXml

Hi, 1) I do a Dataset.WriteToXml(memory stream object) 2) Then i create a XMLDocument object 3) I then XMLDocument.Load (memory stream object) I get a "XML Root namespace not found" exception. Does the Dataset XML not include the required namespace ? Thanks. ...

.NET XML: What is the .NET equivalent of XmlDocument.TransformNode?

In native programming the IXMLDOMDocument2 object had a tranformNode() method: public BSTR transformNode(IXMLDOMNode stylesheet); So in the end i could tranform an XML document using: public string TransformDocument(IXMLDOMDocument2 doc, IXMLDOMDocument2 stylesheet) { return doc.TransformNode(stylesheet); } i'm trying to find th...

.NET : How to validate XML file with DTD without DOCTYPE declaration

I have an XML file with no DOCTYPE declaration that I would like to validate with an external DTD upon reading. Dim x_set As Xml.XmlReaderSettings = New Xml.XmlReaderSettings() x_set.XmlResolver = Nothing x_set.CheckCharacters = False x_set.ProhibitDtd = False x = XmlTextReader.Create(sChemin, x_set) How do you set the path for that e...

Handling RSS Tags with NSXMLParser for iPhone

I've found the following code for parsing through RSS but it does not seem to allow for nested elements: - (void)parser:(NSXMLParser *)parser didEndElement:(NSString *)elementName namespaceURI:(NSString *)namespaceURI qualifiedName:(NSString *)qName{ NSLog(@"ended element: %@", elementName); if ([elementName isEqualToString...

What's the best XSD (XML Schema) authoring tool?

Good XML tools abound, but when it comes to creating (authoring) XSD files (XML schemas), things really don't look good. Most XML editors do the basic: it let you create stuff, with menus for the proper elements. They don't HELP you in any way, though. A few tools have more advanced features, like creating an XSD based on a sample of XM...

POST XML to URL with PHP and Handle Response

I've seen numerous methods of POSTing data with PHP over the years, but I'm curious what the suggested method is, assuming there is one. Or perhaps there is a somewhat unspoken yet semi-universally-accepted method of doing so. This would include handling the response as well. ...

ORDER BY syntax with an XML column in SQL 2005

I have a user profile(more than one profile based on user type) which I'm storing in a DB column(xml). I can query on this using XPATH in my stored procedure, however I am unsure how to then perform an ORDER BY. SELECT U.UserId, UP.Profile, UP.UserParentID FROM aspnet_Users U LEFT OUTER JOIN UserProperties UP ON U.UserId = UP.UserId W...

Eclipse XML formatter

Does anyone know of a free alternative to the built in Eclipse XML editor? The one that is packaged with the IDE has 2 major problems with formatting that my team and I have discovered when formatting: The formatter tries to parse escaped char's as though they were unescaped. e.g. ' & l t ;' is treated like '<' which causes the forma...

How to convert XML to JSON in Python?

I'm doing some work on App Engine and I need to convert an XML document being retrieved from a remote server into an equivalent JSON object. I'm using xml.dom.minidom to parse the XML data being returned by urlfetch. I'm also trying to use django.utils.simplejson to convert the parsed XML document into JSON. I'm completely at a loss as ...

Can anybody provide XMLTextReader Custom Logic to read large XML fast...?

Hi friends, I want a help that i need a custom logic to read large XML of size 1GB. Thanks sivaram ...

Groovy+ XML: handle Attributes with Namespace-Prefix

Hi, I'm working on a XML-document with Groovy and test a node for a certain attribute, which has a namespace prefix. How could it work: in groovy-script: ... Element.Subelement.each { if (it.'@type'=='ns2:xyType') ...do what ever... } in XML document: <Element> <Subelement xsi:type="ns2:xyType"> <!-- or another type...