xml

ASP.NET XML ObjectDataSource Wrapper Class Examples

I want to use XML instead of SQLServer for a simple website. Are their any good tutorials, code examples, and/or tools available to make a (prefer VB.NET) wrapper class to handle the basic list, insert, edit, and delete (CRUD) code? The closest one I found was on a Telerik Trainer video/code for their Scheduler component where they us...

[Best Practices] XSD: Nested Types vs Global Types

When defining XSD you can either choose to define your types as nested types or global types (complexType). I understand that global types are of much more use when it comes to morphism or reusing of elements. However, if you have a big data model you would have to define for each level a global complexType and then create an elemen...

Can I create a value for a missing tag in XPath?

I have an application which extracts data from an XML file using XPath. If a node in that XML source file is missing I want to return the value "N/A" (much like the Oracle NVL function). The trick is that the application doesn't support XSLT; I'd like to do this using XPath and XPath alone. Is that possible? ...

Validating a HUGE XML file

I'm trying to find a way to validate a large XML file against an XSD. I saw the question ...best way to validate an XML... but the answers all pointed to using the Xerces library for validation. The only problem is, when I use that library to validate a 180 MB file then I get an OutOfMemoryException. Are there any other tools,libraries,...

How to Convert a StreamReader into an XMLReader object in .Net 2.0/C#

Here's a quick question I've been banging my head against today. I'm trying to convert a .Net dataset into an XML stream, transform it with an xsl file in memory, then output the result to a new XML file. Here's the current solution: string transformXML = @"pathToXslDocument"; XmlDocument originalXml = new XmlDocumen...

XML dataset in Crystal Reports

I am trying to print a report from within an InfoPath template. So my dataset is an XML DOM that I will load into the Crystal Report at runtime. But how do I define the dataset off which the Crystal Report is developed? Crystal Reports has a great tool to build a dataset from an SQL database. Is there something similar for XML schema t...

XML namespaces and attributes

I'm trying to understand how namespaces work in XML. When I have an element like foo:bar, the attributes will often not have namespaces on them. But sometimes they will. Are the attribute in the namespace of the element, even when the default namespace has been declared? Looking over the xsd for xhtml it seems the attributes are part of ...

Is there a class to generate a sample XML document from XSD schema in .NET

In Visual Studio you can create a template XML document from an existing schema. The new XML Schema Explorer in VS2008 SP1 takes this a stage further and can create a sample XML document complete with data. Is there a class library in .NET to do this automatically without having to use Visual Studio? I found the XmlSampleGenerator artic...

Parsing an XML file in C#

What is the fastest method of parsing an XML file in C#? I'm using .Net 2.0 ...

Easy .NET XML Library

Following my question regarding a .NET YAML Library... as there doesn't seem to be great support for YAML in .NET, are there and good open source really simple .NET XML libraries. I just want something where I can pass it a section name and a key and it gives me the value as well as being able to give me a list of all the current sectio...

Java object allocation overhead

I am writing an immutable DOM tree in Java, to simplify access from multiple threads.* However, it does need to support inserts and updates as fast as possible. And since it is immutable, if I make a change to a node on the N'th level of the tree, I need to allocate at least N new nodes in order to return the new tree. My question is,...

How do I serialize a DOM to XML text, using JavaScript, in a cross browser way?

I have an XML object (loaded using XMLHTTPRequest's responseXML). I have modified the object (using jQuery) and would like to store it as text in a string. There is apparently a simple way to do it in Firefox et al: var xmlString = new XMLSerializer().serializeToString( doc ); (from rosettacode ) But how does one do it in IE6 and o...

What are good alternative data formats to XML?

XML, granted, is very useful, but can be quite verbose. What alternatives are there and are they specialised for any particular purpose? Library support to interrogate the contents easily is a big plus point. ...

How to do Streaming read of a large XML file in C# 3.5 ...

How can you do a streaming read on a large XML file that contains a xs:sequence just bellow root element, without loading the whole file into a XDocument instance in memory. ...

XML Editor for OS X

Hi http://stackoverflow.com/questions/12073/what-is-the-best-xml-editor was a great question regarding XML editors on Windows. What about on OS X? Oxygen is feature complete, but, it's a Java app and a bit clunky on OSX. It's also extremely expensive. Anything Mac native and comparable in features for less than $300 ? Thanks Andrew...

Can XPath match on parts of an element's name?

I want to do this: //*fu, which returns all nodes whose name ends in fu, such as <tarfu /> and <snafu />, but not <fubar /> ...

How do I create an XmlNode from a call to XmlSerializer.Serialize?

I am using a class library which represents some of its configuration in .xml. The configuration is read in using the XmlSerializer. Fortunately, the classes which represent the .xml use the XmlAnyElement attribute at which allows me to extend the configuration data for my own purposes without modifying the original class library. <?xml...

Recursive function for an xml file (hierarchial data).

Hi, I want to recursively traverse an XML file, and need a little help with the C# code. My XML file looks like: <categories> <category id="1"> </category> <category id="2"> <category id="3"> </category> <category id="4"> <category id="5"> </category> </category> </c...

create and stream large XML document in C++

I have some code that creates a fairly large xml DOM and writes it off to a file (up to 50-100MB) . It basically creates the DOM and then calls a toString on it and writes it out with ofstream. Is there a way to get streaming output of the generated dom so that it doesn't create the whole structure in memory all at once and then copy it,...

Can XML comments go anywhere?

I wrote a simple tool to generate a DBUnit XML dataset using queries that the user enters. I want to include each query entered in the XML as a comment, but the DBUnit API to generate the XML file doesn't support inserting the comment where I would like it (above the data it generates), so I am resorting to putting the comment with ALL ...