xml

Associating Windows Forms TreeView items to actual data

So - working with C# and Windows Forms, I have a bunch of "Task" classes. Every class has a List<Task>, so that they can have any number of children (and the children can obviously have more children...) These tasks are stored in a "Project" class (in a List<Task>, obviously), which is then serialized to XML. I have a function to recurs...

Drawing chart using amcharts

Can anyone tell how to use amcharts to display the details of a particular column in a pie/donut chart.I know that it uses an XML but what I have is a CSV file and I have to group them based on a particular column status whose value can be one of the four namely "open" "Close" "In Progress" "Dropped".The CSV looks like this 12345,Harish...

Updating frontend layout from a module

Hi, I've created my own magento module and successfully extending core controllers and models but I'm having trouble doing the same with the layout xml files. I want to update just the checkout multishipping shipping page. So far I've only managed to to overwrite the entire checkout.xml file but I would much prefer to just have the i...

C# Linq XML Find Specified element

Please could someone post an example of how to check if an element exists in an xml file using linq? Here is the xml document: <Database> <SMS> <Number>"+447528349828"</Number> <Date>"09/06/24</Date> <Time>13:35:01"</Time> <Message>"Stop"</Message> </SMS> <SMS> <Number>"+447528349828"</Number> <Date>"09/06/24</...

How can I require at least 1 occurrence of an element in the XSD?

How can I require the "Address" element? If I perform an XSD validation on a document with no "Address" it passes, but I would like it to fail. Is this possible? http://en.wikipedia.org/wiki/XSD see the example xsd. it hiding my xsd sample <?xml version="1.0" encoding="utf-8"?> <xs:schema elementFormDefault="qualified" xmlns:xs="http...

Convert XSD files to C# Serializable Class

I tried following the answer to this question, but could not get xsd.exe to happily take the XSD files and turn them into a class. Using the XSD files here: http://download.adamhaile.com/SO/XSD.zip Can anyone help me convert these to a valid C# class that can then be used to serialize an XML document to? Note: Yes, these are from an un...

Xdocument does not print declaration

I try to use the domainpeople.com API and to do I need to use XML. Currently I have an error saying "apiProtocol is not found" I guess then that my Xml document is malformed. The Current xml sent is : <apiProtocol version="1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNameSpaceSchemaLocation="checkrequest.xsd"> <ch...

XML Schema: Setting a default value for a complexType?

Let's say I want to set up a generic complexType like so: <xs:complexType name="button"> <xs:sequence> <xs:element name="id" type="xs:string" minOccurs="0" maxOccurs="1"/> <xs:element name="href" type="xs:string" minOccurs="0" maxOccurs="1"/> <xs:element name="label" type="xs:string" minOccurs="0" maxOccurs="...

How do you serialize/deserialize a list of objects with a common root class?

Related: How can I use polymorphism in XML Serialization? I have a class I wrote for serializing the user's preferences to disk between application sessions. To read/write I'm using XmlSerializer.Deserialize() and XmlSerializer.Serialize(). One property that gets serialized is a list of sub-settings for different application compon...

Why does XSD validation always work for this file?

The following xml file always seems to validate. Not sure why, but when I remove the following ' xmlns="urn:schemas-microsoft-com:office:spreadsheet" ', it seems to throw a validation error as expected. Somehow MS is preventing validation with the added XSD office schema. So anytime that XSD Schema is included you can't validate XML usi...

IE printing out source code at random (seems very nondeterministic)

Hey. the busted website is: www.mgxvideo.com/mgxcopy-alpha-3, and the specific error that I'm getting is the thing where IE prints out all my source code. As far as I can tell, the error is appearing at random in IE6, 7, and 8, but it's a commonly occuring error. I'm looking for explanations, debugging tools, fixes. Anything is appreci...

Unmarshalling XML using JAXB in restlet's acceptRepresentation method.

I've created an XML schema by annotating an existing Java domain model class, now when I try to use JAXB to unmarshall the representation received within my restlet webservice I'm getting a host of errors no matter what I seem to try. I'm new to both restlets and JAXB so pointing me in the direction of a decent example of using both woul...

How do I use XmlSerializer to insert an xml string

I have defined the following class: public class Root { public string Name; public string XmlString; } and created an object: Root t = new Root { Name = "Test", XmlString = "<Foo>bar</Foo>" }; When I use XmlSerializer class to serialize this object, it will return the xml: <Root> <Name>T...

WPF XML DataBinding

I'm trying to do some WPF databinding, but I'm a little hung up at the moment. I have two listboxes and an XML file. The first listbox successfully binds to the XML source. However, when I try to bind to a child of the selected item from first listbox as the source for the second list box, nothing appears. The goal being something like a...

Adding nodes to non-default namespace results in duplicate qualifiers

I am rewriting an existing XmlDocument, which contains an element that has a new default namespace defined (see below, the assemblyBinding element) <?xml version="1.0" encoding="utf-8" ?> <configuration> <runtime> <legacyCasPolicy enabled="true" /> <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> </assemblyBindin...

NSXMLParser shreds umlauts (ä, ö, ü)

Hi, I use NSXMLParser for parsing XML documents of a server. They are encoded as UTF8. My problem is, that NSXMLParser breaks at umlauts (ä, ö, ü) and starts a new element. For example: Lösen -- NSXMLParser ---> L + ösen How do I get NSXMLParser to read my umlaut words completely, as every other word. Regards ...

org.w3c.dom.Document to XML string using Groovy

I have an org.w3c.dom.Document instance which I need to convert to an XML string. I know how to do this in Java (using javax.xml.transform facilities), but I wondered whether there is a more "groovy" way of doing this? I've tried using a the DomToGroovy class, which successfully create a groovy script version of the DOM document. But I'...

Quick way to covert a large JSON file to XML

Does anyone know of an application that can be used to convert a large JSON file to XML? We have a program that takes XML input, and we need to feed it some data that has arrived as a JSON file. Rather than update the whole program to take JSON input, it seems simpler to just convert this file. The JSON file is between 3 and 4 GB (and ...

how to read a xml file using java?

I need to read an XML file using java.Its contents are something like <ReadingFile> <csvFile> <fileName>C:/Input.csv</fileName> <delimiter>COMMA</delimiter> <tableFieldNamesList>COMPANYNAME|PRODUCTNAME|PRICE</tableFieldNamesList> <fieldProcessorDescriptorSize>20|20|20</fieldProcessorDescriptorSize> <fieldName>company_name|product_name|p...

Using PowerShell to download XML, and save as CSV file?

I'm fairly new to PowerShell, but have a strong C# background. The task I'm trying to accomplish is to download some XML, and then save some of the elements from the XML file in a .csv file. I don't need all the elements from the XML, just a few items. The XML looks something like this: <result> <case> <InputData> <Id>1</I...