xml

Slow SelectSingleNode

I have a simple structured XML file like this: <ttest ID="ttest00001", NickName="map00001"/> <ttest ID="ttest00002", NickName="map00002"/> <ttest ID="ttest00003", NickName="map00003"/> <ttest ID="ttest00004", NickName="map00004"/> ..... This xml file can be around 2.5MB. In my source code I will have a loop to get nicknames In each ...

Where can I get a list of the 'Custom Tool' code generators that come with VS2K8?

I've used MSDataSetGenerator a fair bit and it causes a bunch of pain because the XMLSerializer rarely works on the output. Are there any other code generators that come with the SDK? ...

Ambiguous XML schema

Hi, I'm trying to produce a pretty simple XML schema for an XML similar to the following: <messages> <item> <important_tag></important_tag> </item> <item> <important_tag></important_tag> <tag2></tag2> </item> <item> <tag2></tag2> <tag3></tag3> </item> </messages> The idea is that <important_tag> will h...

create XmlSerializer in MFC C++

Hi, I want to implement in my MFC application project this logic, which written in C# looks like: XmlSerializer ser = new XmlSerializer(typeof(A_CLASS)); StringBuilder sb = new StringBuilder(); XmlWriterSettings sett = new XmlWriterSettings(); sett.Indent = true; sett.IndentChars = "\t"; using (XmlWriter sw = XmlWriter.Create(sb,...

How to do mutually exclusive attributes in XML schema?

I'm trying to make two XML attributes to be mutually exclusive. How can one create an XSD schema to capture this kind of scenario? I would like to have one of these <elem value="1" /> <elem ref="something else" /> but not <elem value="1" ref="something else" /> ...

Is XML considered harmful?

The title of the question pretty much says it all. But these are the keypoints that I am interested to find out, and they are just totally random in my mind: Does it it make your job as a developer easier or harder? Does it make you more or less productive? Parsing with a DOM parser requires more memory to hold the entire structure of...

When to use xml with xsl instead of HTML?

I like .NET webcontrols and you manipulate things, that's common consensus, but XML and XSL is so great, because you have UI logic that is platform & language-independent, so one day I change the app to php, java or whatever and i can reuse all the presentation logic. Moreover, XSL has the possibility to call .NET (or whatever) methods ...

Expanding a node in ASP.Net TreeView through XML Attribute

I have a ASP.Net TreeView control that I am binding to an XML data source. I'm wanting to be able to control which nodes are expanded and which ones are collapsed in the XML definition file. The Expanded='' doesn't work for me though. In the following simple example, I want Node 2 to be fully expanded. ASP Page... <asp:XmlDataSource ID...

Implementing my own XPathNavigator in C#

I am looking for a C# example implementation of a class derived from Microsoft's XPathNavigator class. Can any one point me at such an article? As you may (or may not) know, the XmlNavigator is designed to allow one to superimpose XPath navigation on most any data model. I have implemented my derived XPathNavigator class and it work...

Xml tool to test xml data

Hi guys, I'm in a project that loads a lot of XML from web services and I need to send the correct one and get the one I am expecting, a part that run the web app in Debug mode and add a breakpoint after getting the XML String, what can I have as a free plugin or even a trial program to let me see what XML is sending by my web applicati...

How do I manage to get a non-null name argument with org.xml.sax.ext.EntityResolver2 resolveEntity method ?

In Java SAX processing, I dot not manage to obtain entity reference names from the org.xml.sax.ext.EntityResolver2 resolveEntity method. The name argument is always null even if the documentation states that "'name' is never null when invoked by a SAX2 parser". Any idea ? To demonstrate the issue, I have created a Jython 2.5 script. I...

Force use of CDATA in XML-schema

I am creating an xml schema, and I want to make sure that the values in all the elements are CDATA elements. Is there a way to force this using XML-schema? ...

serialize an object with its attribute to xml

Exact Duplicate of: http://stackoverflow.com/questions/390800/is-there-a-way-to-do-object-with-its-attributes-serializing-to-xml Quite Ironically, it's a duplicate of the poster's previous question. I want create an object, it contains some Validate application block attributes like: [Serializable] public class FormElement:IValid...

Is there any perfomormance differences between binary and XML serialization?

in terms of both parsing (serializing, deserializing) and sending packets over the network is there any good estimation of performance differences between binary and xml serialization? ...

Best practices: When should I use elements and when should I use attributes?

Which would be the correct format for this XML data, are they equivalent or are there trade offs between the two? 1. <sitemap> <category name="Animals"> <section title="Dogs"> <page url="/pics/greatdane.jpg" title="Great Dane"/> </section> </category> </sitemap> 2. <sitemap> <page> <category>Animals</category...

XSL That Returns the XML unchanged

Hi - I am looking for a XSL snippet that simply returns the XML unaltered. It sounds trivial but I can't seem to find an example anywhere on the web. Any help out there? ...

Custom date format in XML-Schema

I am creating an xml schema, and I want to support a custom date format: Thu Dec 11 14:17:20 2008 Currently I'm using the following pattern type: <xs:simpleType name="Date_Type"> <xs:restriction base="xs:token"> <xs:pattern value="(Sun|Mon|Tue|Wed|Thu|Fri|Sat) (Jan|Feb|Mar|Apr|May|June|Jul|Aug|Sep|Oct|Nov|Dec) [0-9]{2} [0-9]{2}:[0...

To parse an XML file in java whose path is to be got dynamically

Hi, I have a class Test in C:/proj/test_xml/Test.java. Given parser.parse("test.xml"); I need a way to parse test.xml whether it is in current directory, proj or in C:/ Also, the solution should not make use of java.io Thanks ...

XSD class generation nested tables problem

Currently I'm having a problem with generating class files from a xsd with repeating elements. I’m using the custom tool ‘MsDatasetGenerator’ in VS2005 SP1 witch create a typed dataset from the xsd for c#. I’m trying to parse the xml by this schema <?xml version="1.0" encoding=\"utf-8\"?> <xs:schema id="XSDobject" targetNamespace="h...

Are there libraries to perform xslt transformation in erlang?

I'm really new to erlang and I'm wondering how to manipulate xml. I've found erlsom but I need to do some simple transformation on a xml. I'm looking for an xslt (even 1.0) library, but I haven't found anything and reduced myself to do the transformations by hand working on the DOM, or whatever you can call a structure representing the...