xml

How to parse XML Schema File

Hello all, Good day. How to parse XML Schema(.xsd) file and generate to c# class file. About my project: Step1. Parse XSD file (C# lang) ----Build Time -----> Generate CCode Dictionary(C# Class) Step2. Paser XML file(C# lang) ----Run Time -----> Fill the CCode Dictionary with the XML file value (C# App) I researched the tools o...

Linq to XML when data held in a list

I have a list of strings that I need to use to create the following XML. The items in the list are strings "Line 1", "Line 2" etc. The tricky bit is that the element names increment from "l1" upwards. Is it possible to use Linq to do this or should I use a different approach ? <srv> <enqRsp> <l1>LINE 1</l1> <l2>LINE 2</l2> ...

Load XML file into DataTable (not from a Database)

I'm looking into changing my application to load its xml format data files into DataTables (and a DataSet?) instead of deserializing them into classes. I can generate a dataset using xsd.exe, but I'm not having any luck finding any examples showing how to use it. My Google searches have been hopelessly clogged with examples using xs...

How can I get the XML nodes from this XML in classic ASP (MSXML)?

Hi all, OK, I'm at my wits end. This seems like it should be a completely trivial thing to do, yet after an hour I still just cannot make it work. I'm trying to get a list of time zones from the Campaign Monitor API; unfortunately the page I need to do this in is written in classic ASP/Javascript so I can't just use the API wrapper. I...

Update a single XML entity using Hpricot in Ruby?

I am going to be using Hpricot to process an XML file. I want to randomly display some quotes from the file, and then I want to keep track of how often each quote has been displayed. Is it possible for me to update a single item within the XML file using Hpricot (or is there some other solution that can do this for me?) or should I just...

Parse MS Word document for XMLfragments - C#

Hello there, I have a MS Word document which is having XML nodes along with plain text. Could you please suggest me a way to parse this document and get the collection of all XML fragments that it have using C#. Thank you! ...

XML response of webservice call in C#

I am calling a webservice in C# and am getting an array of objects back. Is there a way of getting an xml string instead? ...

How to compare two XML files and add missing elements using c#

Hi, Occasionally, one or more XML Elements are missing from XML File. Right now, one work around i am thinking is to compare XML file with a master XML File (having all the elements) and if any element is missing then add that element in XML File from master file. How i gonna achieve this or any other better idea? ...

Python: How do I read and parse a unicode utf-8 text file?

I am exporting UTF-8 text from Excel and I want to read and parse the incoming data using Python. I've read all the online info so I've already tried this, for example: txtFile = codecs.open( 'halout.txt', 'r', 'utf-8' ) for line in txtFile: print repr( line ) The error I am getting is: UnicodeDecodeError: 'utf8' codec can't dec...

XML '&' character causing problems

A semi colon character was expected. Error processing resource '... <key>SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\CNXT_MODEM_PCI_VEN_8086&DEV How can I avoid this error being printed out when viewing my XML file in a browser? It seems to complain because of the '&' character, how do I escape it? thanks. ...

Is it there any XPath processor for SAX model?

I'm looking for an XPath evaluator that doesn't rebuild the whole DOM document to look for the nodes of a document: actually the object is to manage a large amount of XML data (ideally over 2Gb) with SAX model, which is very good for memory management, and give the possibility to search for nodes. Thank you all for the support! For all...

can not read xml data into flash

I write a simple xml code, and I try to read the xml file into flash, but I got "undefined" in my output. The codes are as following. Do you know how to sove the problem? Thanks. xml file (test.xml): <?xml version='1.0' encoding='ISO-8859-1'?> <note> <to>Tom</to> <from>Peter</from> <heading>Reminder</heading> <body>Don't forget me ...

C#, XmlDocument, and special ISO Latin characters

I'm trying to load up xml into an XmlDocument, but it doesn't recognize the encoded '&eacute' and throws an error 'An error occurred while parsing Entity Name'. Now I can add a custom entity set in a DTD of my xml, so the XmlDocument loads properly. But what I'm hoping is that I can reference a url that has a common set of these ISO La...

How to cache a jquery Ajax request and parsing

I'm building an application that is an image gallery but with lots of images (it's for browsing archives of documents); basically the application does this: display an image display "previous" and "next" links left and right of the first image The previous and next links are retrieved from an XML file that lists all images in sequenc...

edit/save xml on iphone app

i need help on editing xml content and saving it without over-writting it..right now my programs is able to save and load but all the contents are over-written once a new record is saved..nid some guide on this..thanks! ...

Assigning functions to dynamic movieclips in a loop, ActionScript 2

I have done this same thing in ActionScript 3, but am not familiar with ActionScript 2, which I am forced to use for this project. I am loading products into a SWF via XML and attempting to add a click event to each dynamically-created movieclip. Simply tracing the text from a node in XML will do for now. I'd like to assign a property ca...

Can anyone explain to me what is the meaning of the boolean parameter of the System.Xml.XmlDictionaryWriter.WriteNode(XmlReader, bool) method?

According to MSDN: defattr Type: System.Boolean If true, copy the default attributes from the XmlReader; otherwise false.If true, use default attributes; otherwise false. And my question is what does the author mean by this? ...

Table to XML using TSQL with facet grouping and counts

I have a requirement to turn a table into XML with counts for values. e.g. Table Id , Type, AnotherType 1, This, Widget 2, This, Fimble 3, That, Widget I want the output something like this. This needs to be dynamic so new columns or facets added would generate the this type of output. <matrix name="Type"> <facet name = "this" co...

How to write System.Xml.Linq.XElement using XmlWriter to a stream.

Dear ladies and sirs. I have an XElement instance and I wish to write to a stream using XmlWriter class. Why? Well, one of the configuration settings defines whether to use binary Xml or not. Based on this setting a suitable XmlWriter instance is created - either by XmlWriter.Create(stream) or XmlDictionaryWriter.CreateBinaryWriter(stre...

Can this XML be validated with an XSD, and does it matter?

I'm wary that this may generate discussion rather than answers, but nevertheless ... I currently have an XML that I designed with the primary goal of making it concise and human-readable ... which for me meant favouring attributes over elements and minimizing the vocabulary: <?xml version='1.0'?> <Calculation jobId='XI5-332123' user='...