xml

How to parse XML/HTML server's reponse?

Hello, my first time here. I got these lines as a response from the server and saved them in a file. They look like XML, right? My task is to read the content of those td tags and put them into other structured file(Excel). The problem is I dont know how to do that. At the moment, I think I will strip the first and last line of the fi...

reading value of node that has a specific attribute with Xdocument

Im trying to write a List of 'Documents' from an XML string, but i was wondering what is the best way to get the value of a node of certain attribute. More specifically in the sample I would like to set the value of aDocument.Source to the text "The Source" of the "field" node that has the "Source" value for the "name" attribute. Sampl...

How to create xhtml query strings with Scala?

How do I create an x(ht)ml-Node containing a href-attribute including a query string without the &s being escaped automatically or runtime error? val text = Text("?key=val&key2=val2") will be escaped and val node = <a href="link?key=val&key2=val2">link</a> throws (in Scala 2.7.5): java.lang.AssertionError The node will be used w...

Extract values from string containing xml in silverlight

string xmlText= " <Person> <Name>abc</Name> <Age>22</Age> </person>"; i want the values abc and 22 m using silverlight 4 and XmlTextReader is not available Thanks in advance ...

xml parsing and reading the values in python

Hello All, I want to know how to read and store the xml data in an array.I m not sure which method to use or class Can anyone tell which xml lib to use for reading the xml ...

php xml response gave me this after android sax parsing: XML or text declaration not at start of entity

i need to parse this php xml response in android: <?phpxml version="1.0" encoding="utf-8"?> <SmsResponse> <version>1</version> <result>0</result> <resultstring>failure</resultstring> <description>error</description> <endcause></endcause> </SmsResponse> ...

XPATH Query not return result

Hi given the following Code: private void extractLink(ScriptFile file) throws SAXException, IOException, ParserConfigurationException, XPathExpressionException { Document d = this.parseFile(file); XPathFactory xpf = XPathFactory.newInstance(); XPath xpath = xpf.newXPath(); XPathExpression expr = xpath.compile("//link"); Obj...

XML Validation XSD problem

Hello! XML: <?xml version="1.0" encoding="UTF-8"?> <data> <ac code="B2" auto="1"> <fee> <if country="RU">35e 50e 50e 80e 15e 10e</if> <else>10e</else> </fee> <comission> <if country="RU">3%</if> <else>5%</else> </comission> </ac> </data> Schema: ...

XML Safe URLEncoding?

How do I encode an URL that will be "xml-safe" where the ampersand(&) in the querystring will not corrupt the XML? For Instance: www.somedomain.com/SomePage.aspx?SomeParam=SomeValue&SomeParam2=SomeVal ...

Under High load XDocument.Parse Creating errors

Hi everyone, I am trying to access this webservice, The problem is that sometimes XDocument.Parse is not able to process and generates an error System.Xml.XmlException: Root element is missing. on the line: XDocument xmlDoc = XDocument.Parse(xmlData); Even though the XML sent is correct according to my logs. I was wondering, Is it p...

search dataset from xml file

Hi, I need to filter the results I obtain when I load my xml file. For example I need to search the xml data for items with keyword "Chemistry" for example. The below xml example is a summary of my xml file. The data is loaded in a gridview. Could you help? Thanks! Xml File (summary): <CONTRACTS> <CONTRACT> <CONTRA...

posting xml data from java to rails (restful service)

Hi all, I'm trying to post an xml document from java to a rails application. I have a hard time writing the http request Here's my java code: Socket sock = new Socket(addr, port); String path = "http://127.0.0.1:3000/mycontrollers.xml"; BufferedWriter wr = new BufferedWriter(new OutputStreamWriter(sock.getOutputS...

How can I evaluate an XPath expression in Silverlight?

I need to allow an advanced user to enter an XPath expression and show them the value(s) or nodes or attributes found. In the .Net framework, the System.Xml.XPath.Extensions can be used to call XPathEvaluate, but Silverlight doesn't have this MSDN reference. Has anyone rewritten the extension methods for use in Silverlight? What is the b...

Is file_get_contents slower than include?

have a file caching system for a php 5 library i use often. when the request is made i check for a cached file, if there is one i render it and exit. $contents = file_get_contents( self::_cacheFile() ); echo $contents; exit(); i have to do file_get_contents instead of just include because of cached xml files with the pesky `<?x...

Using Variables in <xsl:sort select=""/>

Hi am build a generic template to list my content. But the Content may be sorted on different @'s or node()'s. So want to pass the xPath in. <xsl:variable name="sort" select="@sortBy"/> <xsl:variable name="order" select="@order"/> <xsl:for-each select="Content[@type=$contentType]"> <xsl:sort select="$sort" order="{$order}" data-type...

Any way to have a schema use user-defined elements in its structure?

I'm wondering if it's possible to have a schema use user-defined elements (from the XML) for its structure. As in, as a user, I would be able to have something like: <subjectType> <name>plane</name> <name>bird</name> </subjectType> <questionType> <name>organic</name> <name>awesome</name> </questionType> <subjectInterview su...

Parsing responseXML with Prototype's $()

I've got XML coming back from an Ajax.Request in Ajax.Response.responseXML. My XML actually contains XHTML tags which I hope to append into my document. I'm having issues appending nodes from the responseXML into the current document, however. I suspect that this is because they are XML nodes and not DOM nodes. Wrapping the responseXM...

How to pass Object tag PARAM value into Flash?

Hey everyone, today I'm trying to get a link to an XML file passed from the Object Embed code into my Flash movie. (Not using SWFobject). I have 1 swf file that should be able to connect to 3 different XML files. Attempt 1 Below is the HTML code (I'm trying to get theXML path): <div class="left"> <h2>300 x 353 Green Accent Color</h2...

Ecmascript in XHTML or SVG

Which is better? To use Ecmascript inside your SVG which is embedded in XHTML sent as application/xhtml+xml or to use Javascript (ecmascript) inside the XHTML within which the SVG to be manipulated is embedded? It feels better to use it inside the SVG, but that's just me. Is there any actual value in any of the methods or are they the s...

How to make C# web service produce soapenv namespace instead of soap?

Is there a way to make a C#/.NET web service which normally produces XML like this <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"&gt; <soap:Header> <DHeader xmlns="http://www.abc.com" /> </soap:Header> <soap:Body...