xml

Enumeration of a complex type

How can I make an enumeration of a complex type? For example, I want to store the following data into a xsd enumeration called Measurings description tag item item tag fileName each one of these attributes has an specific value and this set makes one registry in my ennumeration. But the problem is that as far as I know, it's allo...

Sort/Group XML data with PHP?

I'm trying to make a page using data from the discogs.com (XML)-API. i've been parsing it with simpleXML and it's working pretty well but there is some things i'm not sure how to do. Here is part of the XML: <releases> <release id="1468764" status="Accepted" type="Main"> <title>Versions</title> <format>12", EP</format> <l...

Looking for a free xsd scheme editor

I'm looking for a free alternative to all the XML/XSD editors around here (that are relatively expensive--at least for me). I totally fail to find one. I need it to allow me to edit xsd files to help in writting an xml-based language specification. I need it to be visual to help with the design, making it clear. Other features are less ...

How do I get a list of child elements from XDocument object?

Hello.. I am trying to get all of the "video" elements and their attributes from an XML file that looks like this: <?xml version="1.0" encoding="utf-8" ?> <videos> <video title="video1" path="videos\video1.wma"/> <video title="video2" path="videos\video2.wma"/> <video title="video3" path="videos\video3.wma"/> </videos> The foll...

XQuery: Create a new element with a given name?

I have data like: <td>USERID</td> <td>NAME</td> <td>RATING</td> I want to transform it into: <userid></userid> <name></name> <rating></rating> How can I do this? ...

Find elements based on xsd type with lxml

I am trying to get a list of elements with a specific xsd type with lxml 2.x and I can't figure out how to traverse the xsd for specific types. Example of schema: <xsd:element name="ServerOwner" type="srvrs:string90" minOccurs="0"> <xsd:element name="HostName" type="srvrs:string35" minOccurs="0"> Example xml data: <srvrs:ServerOwner...

XML Document Depth?

How to find the depth of the xml file using powershell/xpath? consider the below xml: <?xml version="1.0" encoding="ISO-8859-1"?> <bookstore> <book> <title>Harry Potter</title> <price>25.99</price> </book> <book> <title>Learning XML</title> <price>49.95</price> </book> </bookstore> depth of the above xml document is 3 (bookst...

Was Joel right about XML being slow?

A long time ago Joel explained how various every-day coding things were slow, and this led to XML as a data store being slow: Back to Basics Are those every-day coding things - strcat and malloc - still slow in a std::string and dlmalloc world? What else has changed in modern processors and mainstream frameworks? And is XML still slow...

JAXB: @XmlTransient on third-party or external super class

Hi, I need some help regarding the following issue with JAXB 2.1. Sample: I've created a SpecialPerson class that extends a abstract class Person. Now I want to transform my object structure into a XML schema using JAXB. Thereby I don't want the Person XML type to appear in my XML schema to keep the schema simple. Instead I want the f...

How to use EMF to read XML file?

EMF = Eclipse Modeling Framework I have to use EMF in one of my class projects. I am trying to understand how to use EMF to do the following: Read XML, Get the values into objects. Use ORM to persist the values in objects to database. - Done Get data from database using ORM and generate XML. I need to do all of that using: EMF (no ...

AS2 attaching or duplicating the MC

var myXML:XML = new XML(); myXML.ignoreWhite=true; myXML.load("tekst.xml"); myXML.onLoad = function(success){ var yC:Number = 65; if (success){ var myTxt:Array = Array(0); var myNode = this.firstChild.childNodes; for (i=0; i<myNode.length; i++) { myTxt[i] = "text"+i+"content"; createTextField(myTxt[i],i,25,yC,167,myNode[i].childNodes...

Serializing classes in C#. nested XML

Hi All, I have to generate XML in the below format <objects> <items> <item ="delete"> <searchfields> <searchfield name="itemname" value="itemValue" /> </searchfields> </item> </items> </objects> So I have generated the CS file using xsd.exe by converting the above XML to XSD. xsd.exe -c -l:c# -n:XmlSerializationDeleteObj...

Create XML from Access

Hi, We need to generate an XML using Access, is there any Visual Basic objects or functions that can help with the task ? Thanks in advance ...

How to deserialize null array to null in c#?

Here is my class: public class Command { [XmlArray(IsNullable = true)] public List<Parameter> To { get; set; } } When I serialize an object of this class: var s = new XmlSerializer(typeof(Command)); s.Serialize(Console.Out, new Command()); it prints as expected (xml header and default MS namespaces are omitted): <Command><To...

Overwrite the Soap Envelope in Suds python

Hello, I have a camera and I am trying to connect to it vis suds. I have tried to send raw xml and have found that the only thing stopping the xml suds from working is an incorrect Soap envelope namespace. The envelope namespace is: xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" and I want to rewrite it to: xmlns:SOAP-EN...

XmlDocument SelectNodes(Xpath): Order of result

This is an example xml from MSDN <?xml version="1.0"?> <!-- A fragment of a book store inventory database --> <bookstore xmlns:bk="urn:samples"> <book genre="novel" publicationdate="1997" bk:ISBN="1-861001-57-8"> <title>Pride And Prejudice</title> </book> <book genre="novel" publicationdate="1992" bk:ISBN="1-861002-30-1"> ...

How to Retrive data and want to read data from XML in C#

Hi, I am using windows application and i have four combo boxes(comboeventname,combosendtype,comboType,comboschedule) in that form.... I have stored that combo values in to XML file by using XML writer... now i want to display tha datas in that combo boxes in form load event when form opns in run time... How to retrive that values from ...

creating a spreadsheet from an xml file

I am trying to convert a 120mb xml database of terrorist incidents (the first file for download available here http://wits.nctc.gov/Export.do) to spreadsheet form so i can merge it with other data and do statistical analysis. so far I have worked with stata, which is useless now because it wont read xml. the site offers smaller files by...

XQuery to get a list of all attributes an element has

Hi! Is there a generic way of determining all attributes (and their values) from an XML node using XQuery/XPath? thx, Alex ...

Cleaning an XML file in Python before parsing

I'm using minidom to parse an xml file and it threw an error indicating that the data is not well formed. I figured out that some of the pages have characters like ไอเฟล &, causing the parser to hiccup. Is there an easy way to clean the file before I start parsing it? Right now I'm using a regular expressing to throw away anyth...