xml

Using xsl to transform single XML doc to multiple docs

Given the following xml document: <XML> <doc1> </doc1> <doc2> </doc2> <XML> I was hoping to use an xsl transform to generate 2 XML documents: <XML> <doc1> </doc1> <XML> And <XML> </doc2> <doc2> <XML> Is this possible? ...

"Object Required" error in IE8 when using getElementsbyTagName

I have the following code: if (window.XMLHttpRequest) { xmlHttp = new XMLHttpRequest(); } else // for older IE 5/6 { xmlHttp = new ActiveXObject('Microsoft.XMLHTTP'); } var url = 'payment/code/xmlrelay.php?t=rates&id=' + str; xmlHttp.open('GET', url, false); xmlHttp.send(); xmlDoc = xmlHttp.responseXML; xmlResult = xmlDoc.getE...

What should I convert ? and . to in xml ?

For XML to work, I know that I should convert & to &amp;. What should I convert ? and . into? ...

Validate XML Schema in Delphi received by c# web service as a parameter

I have a C# Web Service that returns a XML as a result that will be consumed by a Delphi 7 application. Normally, I would return a .Net XmlDocument class if I had a .Net client, but, for Delphi, I'm returning a string. Below is the C# Web Service Code: public String ReturnXML() { XmlDocument xmlDoc = GenerateXmlMethod(); String ...

Help regarding the XML schema validation in JavaScript

I am currently working on a scenario where I am converting an input flat file (.txt) to an output XML file using JavaScript. I might have a requirement to validate that output XML file against a 5000 lines XSD. So, could someone please help me with the advantages or disadvantages of doing a schema validation within a JavaScript functio...

How to remove the insignificant whitespace in a XmlNodeType.Text node?

I have an html node: <p>Line1 Line2 Line ThereAreTwoSpacesAfterThis ThereAreTwoSpacesBeforeThis </p> In any browser, the final use result is Line1 Line2 Line ThereAreTwoSpacesAfterThis ThereAreTwoSpacesBeforeThis which is the result I want. So how to remove the insignificant whitespace in a XmlNodeType.Text node (C#)? =========...

What is the replacement for `?` and `.` in PHP CURL

I have a PHP CURL query which is of the form curl -u emailid:password -H "Content-Type: application/xml" -d "[email protected] Details" -X POST http://url/xxx.xml The query works fine for all email addresses except those that have &, ? or . where I get an xml query format error. When I replace & with &amp; the & problem is solved...

Highlight and Edit XML in a browser

Trying to provide a user with editable XML page in a browser. For example, the following is part of an XML. <Employee name="John Doe" type="contract" ID="1000"> <Salary>10000</Salary> <Email>[email protected]</Email> </Employee> When the above is presented to the user in a brower (either IE or FF), the user should be a...

SQL server : XML : Data Base Table Optimization

I have a SQL server DB , which have a Table , which Log every Exceptions with details along with 2 XML's (1 for Request , 1 for Response). These 2 XML's are Compressed. Now as the Data volume is high , I need to clean the Table in every 3-4 month. What are the Optimization technique , I can use to avoid Data Clean up's. ...

SAX Parsing in Android Programming

Hello All! I want to do SAS Parsing of the Humidity and the Temperature by Lat - Long using a Web Service in my Application. I don't have a clear idea regarding how to do that actually. So, can anybody please help me with an example if possible. Thanks, david ...

How can I bind a component to an XML node dynamically at runtime?

I have a custom component based on mx:ComboBox. Within it I connect to an HTTPService (the url is passed as a paramter) and bind the combobox. Parameters to be sent to the HTTPService are passed to the component. This is working fine. But I want to modify it to make it re-usable with other HTTP service URLs, which return the XML in a dif...

Is there any built-in function in NET Framework which encodes a string to a valid XML unicode?

After checking an Xps file i noticed that the string within the Xps file <> is converted to &lt;&gt; So is there any built-in function in the .Net framework that could do this job for me? If it does not exist what characters becides <> should i escape in myOwn function? I try to implement a search within an xps file, but searching for ...

Updating an actionscript xml object directly in one line using e4x?

Given the following xml: <form> <personalDetails> <name>John</name> </personalDetails> <financeDetails> <income> <salary>1000000</salary> </income> </financeDetails> </form> I know that is it possible to create the above xml as follows (which is very cool): var xml:XML = <form />; x...

php large xml parse it with pagging

Hi, i have a large XML file with 22000 records that i have to import in my DB. I am looking how to parse the xml with pagging ,meaning parse.php?start=0; //this script get the 0-500 firt records of file parse.php?start=500 //this script get the 500-1000 records of file This way i can bypass memory problems. My problem is how to poi...

Using variable to TSQL + XQuery

All, I have the following code: --xml is already declared and populated with an xml document SELECT ent.query('TradeId').value('.','VARCHAR(10)') TradeId FROM @xml.nodes('//table/trade[1]') Col(ent) How can I have the expression //table/trade[1] as a variable so I can increase the [1] in a loop ? For example I wo...

Can anybody recommend a free xslt tool?

I'm looking for a free xslt debugging tool for Windows. Is anybody using anything worth recommending? Appreciate any advice, thanks. ...

How to get one level in XML by linq

I have an XML <item id="1"> <item id="1.1"> <item id="1.1.1" /> <item id="1.1.2" /> <item id="1.1.3" /> </item> <item id="1.2" /> </item> <item id="2"> <item id="2.1" /> <item id="2.2" /> <item id="2.3" /> </item> <item id="3" /> I need LINQ to get the first level, without children <ite...

How do I maintain the order of values in an XML file with I read it with XML::Simple?

I am using XML::Simple for parsing a XML file. Code is given below with XML file, use Tie::IxHash; tie %$data, "Tie::IxHash"; use XML::Simple; use Data::Dumper; $xml = new XML::Simple; $data = $xml->XMLin("ship_order.xml"); print Dumper($data); XML file, (ship_order.xml) <?xml version="1.0" encoding="UTF-8" ?> <shipment> <sh...

Test if document is well formed before parsing

I need to analyze a few thousand XML documents to see if some of them contains a certain construct. The problem is that some of the documents doesn't contain well formed XML. The basic idea was to use fn:collection() and search inside nodes returned. But this only works if all documents in the collection are well formed. Is it possible...

Adding schema information to xsl transformation output

Hi When performing an xsl transformation on an xml document, I need to add the following snippet to the xml output: <?mso-infoPathSolution name="urn:schemas-microsoft-com:office:infopath:ResourceForm:-myXSD-2010-08-09T08-39-43" solutionVersion="1.0.0.68" productVersion="14.0.0.0" PIVersion="1.0.0.0" href="http://somewhere.com/ResourceF...