xml

Determining the field length of a column in a datatable

I have a DataTable that I have populated via the Dataset.ReadXML() method. I am trying to programatically determine the maximum field lengths for each column in the datatable. The MaxLength value for all of my columns is always at the default of -1. Any thoughts or examples on how to determine the proper max length? maybe based on the ...

Importing XML data into MS SQL server programmatically

I have 5 large XML files which I am keen to analyse. All of them are too large to open in a text editor and so I do not know their XML schemas. I have tried to import them into SQL server, however the process has given me an error even though I am pretty sure they are valid, as they were sourced from very reputable programmers. I have ...

CDATA in XML using C#

This is an unusual situation. We are forced to interface with a 3rd party who requires certain values in the xml response to be wrapped with even if it is just a string value. Example: <Property name="someName" type="String"><![CDATA[someValue]]></Property> We are adding these property nodes to the document as follows: XPathExpressi...

JiBX on Android (or any other build-time bytecode manipulating library)

I'm considering the use of JiBX for a project that will have to run on both Blackberry and RIM. While it seems like J2ME use of JiBX has been considered by the community (as per JiBX jira tickets), Android is relatively new. The question is, therefore, this: has anybody had any success (or issues, for that matter) using JiBX on Android,...

what do i have to do to work with xml in vb.net?

i am trying to use xmlreader and all of those, but i do not know how to reference or import them. i am beginner so please be gentle. thanks! ...

How to ensure xml.dom.minidom can parse its own output?

I'm trying to serialize some data to xml in a way that can be read back. I'm doing this by manually building a DOM via xml.dom.minidom, and writing it to a file using the included writexml method. Of particular interest is how I build the text nodes. I do this by initializing a Text object and then setting its data attribute. I'm not su...

xml comparison

I need to compare two xml chunks: They are semantically equivalent once we see that the "type" attribute is QName and not just a string. Is there a tool that can do such a comparison once I provide the schema? Also, is there such an api? ...

Xerces-C problems; segfault on call to object destructor

I've been playing around with the Xerces-C XML library. I have this simple example I'm playing with. I can't seem to get it to run without leaking memory and without segfaulting. It's one or the other. The segfault always occurs when I delete the parser object under "Clean up". I've tried using both the 2.8 & 2.7 versions of the l...

C# XmlDocument.LoadXml And Wildcards

I have an asp.net application and I'm using C#. I want to use the XmlDocument.LoadXml() method to read from an .xml file. However, the xml file will not always have the same name so I wanted to pass into the LoadXml() method the path to the file and then read any .xml files that are inside. So, something like this LoadXml(C:\Docs*.xml). ...

Are there faster XML parsers in Java than Xalan/Xerces

I haven't found many ways to increase the performance of a Java application that does intensive XML processing other than to leverage hardware such as Tarari or Datapower. Does anyone know of any open source ways to accelerate XML parsing? ...

How to relay dataset/datatable from Tomcat to a .NET application ?

I need to provide data to a DataTable in a .NET application from a servlet hosted in Tomcat. It seems tempting to just stream back XML the .NET application can just pupulate using DataTable.ReadXML. Is that the proper road to go down ? And not the least; are there existing Java components that can help me with this on the Tomcat side ? ...

how do i read / write to a remote xml file with vb.net?

how do i read / write to a remote xml file with vb.net? ...

Xerces: How to merge duplicate nodes?

My question is this: If I have the following XML: <root> <alpha one="start"> <in>1</in> </alpha> </root> and then I'll add the following path: <root><alpha one="start"><out>2</out></alpha></root> which results in <root> <alpha one="start"> <in>1</in> </alpha> </root> <root> <alpha one="start"> <out>2</out> ...

How to change character encoding of XmlReader

I have a simple XmlReader: XmlReader r = XmlReader.Create(fileName); while (r.Read()) { Console.WriteLine(r.Value); } The problem is, the Xml file has ISO-8859-9 characters in it, which makes XmlReader throw "Invalid character in the given encoding." exception. I can solve this problem with adding <?xml version="1.0" encoding="IS...

Rendering an externally modified file in Rails

I've got a cron job parsing a few XML feeds every ten minutes and creating a few partials to include on every page in my Rails project with the render: file method. The problem is that, obviously, they don't refresh until the server restarts. Anyway, what can I do to force rails to refresh this file every time? Thanks in advance. ...

Average Number of XML Relations

Hi Geeks, I would like to know if there is any estimation of the Average Number of XML Relations in an average sized DTD File Thanks, ...

How can I instantiate a comment element programatically using lxml?

Hi there I'm using lxml to programatically build HTML and I need to include a custom comment in the output. Whilst there is code in lxml to cope with comments (they can be instantiated when parsing existing HTML code) I cannot find a way to instantiate one programatically. Can anyone help? ...

DataSet.GetXml not returning null results

Hi, whenever I convert a DatSet into an XML with DataSet.GetXml, any null value is ignored, so, where i expect this: <value1>a</value1> <value2></value2> <value3>c</value3> I get this instead: <value1>a</value1> <value3>c</value3> Any quick and dirty way to handle this? Thanks EDIT: I think a solution would be using WriteXml. Coul...

XML to Relational with DB2 and Java (and Hibernate?)

What I have here is a bunch of XML-Files containing data and a nice ER-Model to which the data belongs. What my problem is: I need to get this data into a db2. The tables with all necessary attributes and keys are already created. I was thinking of three different solutions: Parsing the XML and creating SQL-Queries from it. This solut...

XML Validation in configuration parsing code with XMLSchema: Best Practices? (Java)

Hi everyone! I have to parse a XML configuration file. I decided to do the basic validation with XMLSchema to avoid massive amounts of boilerplate code for validation. Since the parsing class should work for itself i was wondering: "How can i validate the incoming XML file with XMLSchema without having the XMLSchema stored on disc where...