xml

XML to formatted text using XSLT

I have XML in the following format: <Order> <Customer> <Name>kapil</name> <AddressLine1>ABC</AddressLine1> <PostCode>12345</postCode> </Customer> <Customer> <Name>Soniya</name> <AddressLine1>XYZPER</AddressLine1> <PostCode>54321</postCode> </Customer> <Customer> <Name>kapil</name> <Addre...

Parse XML document in C#

Duplicate: This is a duplicate of Best practices to parse xml files with C#? and many others (see http://stackoverflow.com/search?q=c%23+parse+xml). Please close it and do not answer. How do you parse XML document from bottom up in C#? For Example : <Employee> <Name> Test </name> <ID> 123 </ID> <Employee> <Company> <Name>A...

Whare are the differences using xml and mysql database? Which should I use?

Well, I know its a bit stupid. If I want to store a large amount of data. Should I use xml or database(mysql)? Why do you choose (that) one? What are the pros and cons using xml? What are the pros and cons using mysql? Clubpenguin, habbo hotel, those virtual worlds are using xml or mysql?? ...

Date time in xslt

Hi i am having the xml file as: <order><Extension Properties><Date>2009-08-04T17:09:04.593+05:30</Date></Extension Properties></Order> and i want the output as Generation Date 040809 I want to do this via xslt.Please help..!! ...

Has anyone been directly affected by the "XML flaws" problem? If so, how are you addressing it?

I read this story today on El Reg and I'm wondering if anyone in our community has identified issues within their own projects that relate to this and if so, what are those issues, how critical are they, and more importantly, what is being done to mitigate them? A more detailed source for information surrounding this story can be found ...

Filtering XML while preserving its structure

I'd like to remove certain tags from an XML document as part of a filtering process but I cannot otherwise modify the appearance or structure of the XML. The input XML comes in as a string eg: <?xml version="1.0" encoding="UTF-8"?> <main> <mytag myattr="123"/> <mytag myattr="456"/> </main> and the output needs to remove mytag...

variables in xslt

hi friends I am getting a particular value by using <xsl:value-of select="@date" /> and i want to store this value as a variable say 'd' How can i do this and also tell me how can i use that caribale back in my template. Thanks in advance ...

Python SOAP document handling

I've been trying to use suds for Python to call a SOAP WSDL. I just need to call the service programmatically and write the output XML document. However suds automatically parses this data into it's own pythonic data format. I've been looking through the examples and the documentation, but I can't seem to find a way to return the XML doc...

How to specify a list of choices in XSD

I have an XSD definition that has a list of tagged elements. In what way is it possible to allow developer's to only select from a list of elements already defined in the XML file when entering values for a choice-restricted element? In other words, given this XML declaration: <collection> <myItem name="Item_1"> <childEle...

something wrong with xml

I dont understand why it does not display blog entries as <rss version="2.0"> <channel> <title></title> <item> <title>Title to story 1</title> <description>Fusce ornare. Pellentesque convallis, lorem vel imperdiet </description> </item> − </channel> </rss> Going mad here, any advise appreciated!! http://www.pangeaadvisors.org/sep...

Xml to text with formatting

Hi friends...I am having a lot of problem. I need the solution very urgent..please help me So i am having a xml file as: <Order> <EP> <Name>Generation Date</Name> <Value>2009-08-04+05:30</Value> </EP> <EP> <Name>NoOfRecords</Name> <Value>100</Value> </EP> <OrderLineItems> <OrderLineItem OrderDateTime="2007-01-01T17:0...

Searching and replacing XML Data

I need to search for certain nodes in an XML document, modify the InnerXML property of those nodes, and then write the changes out to the file. I can search the nodes find using XPathDocument, XPathNavigator, etc... but any sort of writing using these classes doesn't seem to be supported. Is there a way to pull a node out using the XPa...

JAVA element.getElementsByTagName Restrict to Top Level

I have an XML file as follows: <rootNode> <link>http://rootlink/&lt;/link&gt; <image> <link>http://imagelink/&lt;/link&gt; <title>This is the title</title> </image> </rootNode> The XML Java code using DOM is as follows: NodeList rootNodeList = element.getElementsByTagName("link"); This will give me all o...

Java: How do I ignore certain elements when comparing XML?

I have an XML message like so: <root> <elementA>something</elementA> <elementB>something else</elementB> <elementC>yet another thing</elementC> </root> I want to compare a message of this type produced by a method under test to an expected message, but I don't care about elementA. So, I'd like the above message to be considered...

Converting between C enum and XML

What's the cleanest way to store an enum in XML and read it back out again? Say I've got: enum ETObjectType {ETNormalObjectType, ETRareObjectType, ETEssentialObjectType}; ...and I want to take a variable, enum ETObjectType objectType = ETNormalObjectType;, and convert it to XML that looks like this: <objectType>ETNormalObjectType</obj...

Is SOAP obsolete?

What is the current best practice for implementing Web Services? Is it still with SOAP? Windows Communication Framework is seemingly better, but isn't it SOAP under the covers? ...

Validating XML in Python without non-python dependencies

I'm writing a small Python app for distribution. I need to include simple XML validation (it's a debugging tool), but I want to avoid any dependencies on compiled C libraries such as lxml or pyxml as those will make the resulting app much harder to distribute. I can't find anything that seems to fit the bill - for DTDs, Relax NG or XML S...

XML:Illegal characters: " /"

I am trying to send a value like <Somevalue = "Value A/B"> through XML.As "/" comes under illegal character,I tired to encode like &frasl; for slash but it is not working.Is there anyway to do the same? ...

XSD restrictions

Is it possible using XSD to restrinct node names to enumeration, and then based on this enumeration add another restrictions? In example, I have this xml: <a> <b name="string" value="hello"> <b name="integer" value="123"> </a> I want "b" nodes have name attribute from enumeration { "string", "integer" }. Then if it's "string"...

Get html tags embedded in xml using linq

Hi I have a basic xml file that looks like this. <root> <item> <title><p>some title</p></title> </item> ... </root> What I want, is to get the whole title string including the html tag of the xml using linq and displaying it in a repeater . I can get the title with no problem, but the <p> tag is being...