xml

Does XQuery have exit statement for FLOWR expressions

I would like to know if xquery FLOWR expression has an exit statement like continue and break? For example I want to exit the for loop when a particular condition is reach. ...

Simplepie iTunes select specific class

I'm parsing an iTunes feed, there are 3 image sizes within the feed and I'm not sure how to fetch the largest one. The iTunes Feed example: <im:image height="53">http://a1.image.53x53-50.jpg&lt;/im:image&gt; <im:image height="75">http://a1.image.75x75-65.jpg&lt;/im:image&gt; <im:image h...

What is the relative processing speed of manipulating data with XML or OOP techniques? (i.e. XProc or XSL vs C# or Java)

What is the difference in processing speed for executing a process using XML manipulation or using object-oriented representation? In general, is it faster to maximize or minimize the reliance on XML for a process. Let it be assumed that the code is highly optimized in either circumstance. A simple example of what I am asking is which...

how to get the nodes with specific element value

Could some one please tell me how do we use the text function in the XPath query. I needed the information for Hillman Library present in the xml http://www.sis.pitt.edu/~arazeez/Librarydata.xml resultNodes = [rssParser nodesForXPath:@"//Library[1]/Hours/TermOrHolidays" error:nil];. for now I used the [1]. But I wanted to use the tex...

PHP Regex for IP to Location API

How would I use Regex to get the information on a IP to Location API This is the API http://ipinfodb.com/ip_query.php?ip=74.125.45.100 I would need to get the Country Name, Region/State, and City. I tried this: $ip = $_SERVER["REMOTE_ADDR"]; $contents = @file_get_contents('http://ipinfodb.com/ip_query.php?ip=' . $ip . ''); $pattern ...

Is Injecting Controlled HTML via AJAX a Security Concern?

Hello All, I have a specific case here in which I would like some security advice. Basically my question is "If I control what is in a database (no user submitted data), is there a security concern to returning the results of a database query in HTML (via AJAX)"? Here's the process that is happening: daily build generates an XML doc...

XSL xsl:template match="/"

I am just learning XML and how to use XSL files. In an XSL file I found the following term: xsl:template match="/" What does this stand for ? And what could I use instead of the "/" ?? Could I write "table" or any other html tag instead of "/" ? ...

deleting unwanted xml nodes

I have a bunch of .xml files with nodes that are causing uncessesary complications. I would like to remove these nodes but ensure that thier children are preserved (not the heirarchical structure but the data). Eventually I want to take the data from each .xml and build a dataframe. It seems like xmlTreeParse along with xmlToList will...

Parsing XML data using PHP

I need to parse all data from below XML file. Please guide me how can I do it? How can I put data into a separate variables or array. Like, the value of <p:productid> tag into $pid and value of <p1:devices> into $pdevice? Here is a sample file: <?xml version="1.0" encoding="UTF-8"?> <p:application> <p1:devices> <p1:d...

parse xml data using php.

Dear all ,I have the sample files below.I can parse data from the simple xml tag.But how can i parse data from this type of xml tag?< p:price >test data< /p:price> or < p1:translation lang="en" type="text" >pls guide.. sample xml file <?xml version="1.0" encoding="UTF-8"?> <mynotes> <note> <tasks>Task 1</tasks> <detail...

Whether to use SQL , XML/JSON ?

After doing my exercise in school, I use Sqlite to store my data. But there's XML / JSON [ I haven't tried yet, but I prefer JSON because its' simplicity ], they're used to store data too. And they seems popular, there's JSON for C#,C++,py .... I wonder when to use these ones ? And I'm happy to hear about theirs performance too, I care...

When matching html or xml tags, should one worry about casing?

If you are parsing html or xml (with python), and looking for certain tags, it can hurt performance to lower or uppercase an entire document so that your comparisons are accurate. What percentage (estimated) of xml and html docs use any upper case characters in their tags? ...

using variable in xpath query..is it possible??

Could some one please tell me how do we use the text function with variable in the XPath query in c-objective for iphone. I needed the information for Engineering Library present in the xml http://www.sis.pitt.edu/~arazeez/Librarydata.xml NSString *libName = @"Engineering Library"; NSMutableString *xpathquery = [[NSMutableString a...

simplexml_load_string equivalent Python / Django

Hi I'm trying to find a xml-interpret function (like the simplexml_load_string) in Python, but with no success :/ Let's say I have xml in a string my_xml_string = """ <root> <content> <one>A value</one> <two>Here goes for ...</two> </content> </root>""" To read an value in php I would normaly do something...

correct this xpath expression please

This is a piece of my XML document: <?xml version="1.0" encoding="UTF-8"?> <catalog> <mfVictor> <decal> <company>Victor</company> <title>Wood Horn with Blue Background</title> <image> <url>victor01.jpg</url> <width>60</width> <height>60</height> <name>Wood Horn Blue Background</name> <link></li...

How to rename <ArrayOf> XML attribute that generated after serializing List of objects

I am serializing List of objects List<TestObject> , and XmlSerializer generates <ArrayOfTestObject> attribute, I want rename it or remove it. Can it be done with creating new class that encapsulated List as field? [XmlRoot("Container")] public class TestObject { public TestObject() { } public...

How to get the xml attribute values?

Say I have some xml. How to get the attribute value using VB? ...

How read < abc: xyz > xml tag using php?

Dear all, Using my below code i can read < abcxyz > xml tag easily. but how can i read the data between < abc : xyz > < / abc: xml > xml tag.. xml tag using php.pls help.... my php sample code... $objDOM->load("abc.xml"); $note = $objDOM->getElementsByTagName("note"); foreach( $note as $value ) { $tasks = $value->getE...

Open XML - where did my Prefix Go?

Hi everyone. Please help with this if you can. Its very urgent and I can't seem to get my head around the problem. Note that I'm not a regular OpenXML developer. While debugging, the newly created element has its Prefix as w: , but the Xmldoc at the end loses it. The resultant InnerXML for the Element below is : <altChunk id="FF_HTML" ...

Xml File Creation in C# using Xml To Linq

I've an xml file(Sample.xml) which has the following structure <Root> <Child ChildName="Ms_7"> <MissingSiblings> <Sibling SiblingName="47" /> </MissingSiblings> </Child> <Child ChildName="Ms_8"> <MissingSiblings> <Sibling SiblingName="P2" /> </...