xml

In XML, is order important?

Is the order that elements of a common parent appear in XML a meaningful piece of data captured by the XML document, or is order not specified as being meaningful? For example, consider the two XML documents: <people> <person name="sam"/> <person name="juni"/> </people> and <people> <person name="juni"/> <person name="sam"/> </pe...

mediawiki: getting the pages in a given category.

using the mediawiki API, I can list the pages in a given category. For example: http://en.wikipedia.org/w/api.php?action=query&amp;list=categorymembers&amp;cmtitle=Category:Physics returns: <?xml version="1.0"?> <api> <query> <categorymembers> <cm pageid="22939" ns="0" title="Physics" /> <cm pageid="24489" ns="0" ti...

Serializing a List hold an interface to XML

I have been reading around but I have not come across a solution to my problem I am currently working with a Business Object that will hold all my data and we need to convert this object to and from XML. My object holds a list of Actions (List...), but there are 2 action types (for now). I have to action types SimpleAction and Composit...

C XML library for Embedded Systems

I'm working on a project for an embedded system that's using XML for getting data into and out of the system. I don't want the XML handling to devolve into a bunch of bits that build XML strings using snprintf()/strcat() and friends or parse XML by counting "<" and ">" characters. I've found several XML libraries, a couple of which migh...

Iterate Xml Column elements and comapre against Xml Variable

Hi, I'm not sure how to word this correctly but I'm very (very) new to XML in Sql Server. I have an XML Column defined in a table and I want to retrieve the id of the record if the data in the Xml Column matches elements in a predefined list. The data looks a bit like this: <Parameters> <Parameter> <Name>Param1</Name> ...

Parsing XML files with Java and spaces in file path

I have files on my file system, on Windows XP. I want to parse them using Java (JRE 1.6). Problem is, I don't understand how Java and Xerces work together when the file path has spaces in it. If the file has no spaces in its path, all works fine. If there are spaces, I may have this kind of trouble, even if I call the parser with a Fi...

string escape into XML

Hello everyone, Any C# function which could be used to escape and un-escape a string, which could be used to fill in the content of an XML element? I am using VSTS 2008 + C# + .Net 3.0. EDIT 1: I am concatenating simple and short XML file and I do not use serialization, so I need to explicitly escape XML character by hand, for example...

Set the Default Value for a property in an ADO .NET Data Service

I have an Entity Data Model being read by an ADO .NET Data Service. The entity in question looks like this: **PaidAmount** Id FY_1993 FY_1994 ... FY_2030 Is it possible to set a default value so that values of 0 aren't serialized? I have tried setting FY_1993's Default Value to both 0.00 and 0 but when I view the Entity in the .svc t...

converting & to &amp; for XML in PHP

I am building a XML RSS for my page. And running into this error: error on line 39 at column 46: xmlParseEntityRef: no name Apparently this is because I cant have & in XML... Which I do in my last field row... What is the best way to clean all my $row['field']'s in PHP so that &'s turn into &amp; ...

Managing XML files in a Visual Studio project (2 instances)

Managing XML files in a Visual Studio project (2 instances) If I add an XML file to my VS project it at the root level of the project with the source files. But then if I want to test or build I need a copy down in the bin directory. Of course I always end up editing the one at the root level that is in VS and then I go to test and am u...

XML to C# Class Question

Can someone please help me, I have this xml snippet <?xml version="1.0" encoding="utf-8" ?> <EmailConfiguration> <DataBoxID>123</DataBoxID> <DefaultSendToAddressCollection> <EmailAddress>[email protected]</EmailAddress> </DefaultSendToAddressCollection> </EmailConfiguration> I want to create a corressponding c# class from...

MVVM with XML Model and LinqToXml?

Hi, I've been reading up on the MVVM pattern, and I would like to try it out on a relatively small WPF project. The application will be single-user. Both input and output data will be stored in a "relational" XML file. A schema (XSD file) with Keys and KeyRefs is used to validate the file. I have also started to get my feet wet with Lin...

How do I parse XML containing custom namespaces using SimpleXML?

I'm wondering how to parse values in XML that appear to have : in their name. I've been using: $response = file_get_contents($url); $data = simplexml_load_string($response); then doing a: foreach($data->item as $key => $current){ However, one of the latest feeds that I've been given has colons in the name of the feed as seen in ...

Finding node order in XML document in SQL server

How can I find the order of nodes in an XML document? What I have is a document like this: <value code="1"> <value code="11"> <value code="111"/> </value> <value code="12"> <value code="121"> <value code="1211"/> <value code="1212"/> </value> </value> </value> and I'm tr...

How can I attach a file with a PHP cURL XML Call

I'm using the Amazon AIMS API to upload a an inventory file and I'm having an issue with the cURL call to upload the file. The documentation is very limited, so there is no example code that helps out in this. This is what I have so far of the cURL call: // $FILENAME is filename of the CSV file being uploaded: $inventory = fopen($FILE...

XSLT: <xsl:strip-space> does not work ...

Hi there, I have a servlet filter in my application that intercepts all the incoming requests and tries to strip the whitespaces from the incoming XML and write the resulting 'clean' XML to the response. I am using XSLT to achieve this. Please see the XSLT below: <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version=...

How to assert that all child nodes have a certain attribute value in XPath?

Given the following partial XML document: <section> <entry typeCode="DRIV"> <act classCode="AT" moodCode="DEF"> <statusCode code="completed"/> </act> </entry> <entry typeCode="DRIV"> <act classCode="ACT" moodCode="DEF"> <statusCode code="completed"/> </act> </entry> <entry typeCode="DR...

Wrap text in xml into element tags in Linq to Xml

I need to wrap up all the text thats in a large XElement tree, into Elements. For example: <element1>hello<element2>there</element2>my friend</element1> Becomes <element1><text value=”hello”/><element2><text value=”there”/></element2><text value=”my friend”/></element1> ...

Need xml component supporting D2009

I'm looking for a xml component/Library which supporting Delphi 2009. Thanks! ...

Way(s) to extract selected node values from this XML Markup

Given the (specimen - real markup may be considerably more complicated) markup and constraints listed below, could anyone propose a solution (C#) more effective/efficient than walking the whole tree to retrieve { "@@value1@@", "@@value2@@", "@@value3@@" }, i.e. a list of tokens that are going to be replaced when the markup is actually us...