xml

Is machine readability a valid point for xhtml if it does not validate?

I often run across developers that insist on using the XHTML doctype and when I ask why they common response is that its "machine readable". Once the project is underway the markup does not validate. Now that their markup does not validate...is machine readability valid anymore? I assume that if it does not validate it can't be process...

Sort XML data in classic ASP

I want to sort below xml, Based on the Adult and child ( i need to take Adult and child as constant): <HotelDetails> <hotel> <rooms> <room> <roomname>Single</roomname> <Price>100</Price> <Adult>1</Adult> <child>0</child> </room> </rooms> <rooms> <room> <roomname...

SimpleXML: Selecting Elements Which Have A Certain Attribute Value

In an XML document, I have elements which share the same name, but the value of an attribute defines what type of data it is, and I want to select all of those elements which have a certain value from the document. Do I need to use XPath (and if so, could you suggest the right syntax) or is there a more elegant solution? Here's some ex...

Parsing POST from Gnip.com via PHP

Hello! I've set up a filter at Gnip.com. In the field "POST URL" I've typed in my script URL. The URL is correct since Gnip.com really calls it. But when the script is called, I don't get any data. I've tried to parse $_GET and $_POST but both are empty arrays. getallheaders() gives me some data but no XML. How do I get the XML sent by ...

Multilanguage flash with XML and dynamic text

I created 5 button for 5 languages. And 5 XML for each languages. Language in the flash will change according to the language button pressed. The following AS is assign to the english language button on (release) { gotoAndPlay("intro", "intro2_english"); loadMovie("english header.swf",1); var english2 = new XML(); english2....

C # SelectSingleNode - Can it be used recursively?

As in, if I have an XML Document <root a="value"> <item name="first"> x <foo name = "firstgrandchild">There is nothing here</foo> y <foo name = "secondgrandchild">There is something here</foo> </item> <item name="second"> xy <foo/> ab </item> </root> I want to fi...

C# toolstrip menu & something more

Hello , i have the following situation : with my function i get an XML file , parse it and add group box with image and a text box for every post node in the XML file , And for each group box i assign name and toolstrip menu which has a dinamicly added 1 item the thing i want to do is this - when clicked this item ( lets say the item ha...

Javascript better way to identify node of callback than XSLT generate-id() on another attribute.

The init() is able to use the parameter passed to it in this example: <body onload="init(this);"> testdOnChange() in this example uses a more complicated technique with XSLT generate-id(): <testd:test testd_id="TESTD_ID_id0x03cc1988" testd_on_load="testdOnChange(testdGetElementById('TESTD_ID_id0x03cc1988'));" /> Is t...

PHP: is JSON or XML parser faster?

I'm building classes that interface with the Twitter API, and I'm wondering whether PHP's built-in XML or JSON parser is faster? Twitter will send me the same data in either format, so PHP performance will determine my choice. I'm using php_apc, so you can disregard parse time and assume I'm running off bytecode. Thanks! more: I'm jus...

use xml for an ajax call

Hello, I need help with this code because for some reason I don't get the data back It is probably something that got mixed up, because I never used xml with an ajaxcall Could someone check if they see something going wrong here function updateGebruikersonline(){ //voor het fade effect gebruikerslijst.hide(); loading2.fadeIn(2000, ...

Reading RSS feed using jQuery

I'm trying to show the title of my latest stumbleupon item using their RSS feed and jquery. The function I have is: function get_stumbleupon() { $.get("http://rss.stumbleupon.com/user/fredkelly/", function(data) { alert(data.title); }, "xml"); } Which returns nothing... I just simply want to get a few bits of info about the single...

DOMNode to DOMElement in php

I want to convert a DOMNode object from a call to getElementsByTagName to a DOMElement in order to access methods like getElementsByTagName on the child element. In any other language, I would cast and it would be easy, but after some quick looking, PHP does not have object casting. So what I need to know is how to get a DOMElement objec...

Can dom parsers read inside HTML comments, or is Regex the only way

I am creating very simple CMS for my organisation. My strategy is to embed editable content between tags called < editable >. However to hide these from the browser I am commenting them out. So an example of an editable region will look like this. <!-- <editable name="news_item> Today's news is ... </editable> --> With the content "T...

SQL Server: Output an XML field as tabular data using a stored procedure

I am using a table with an XML data field to store the audit trails of all other tables in the database. That means the same XML field has various XML information. For example my table has two records with XML data like this: 1st record: <client> <name>xyz</name> <ssn>432-54-4231</ssn> </client> 2nd record: <emp> <name>abc</...

change the characters of xml in actionscript

Hi community I have the following problem, given this xml <test> <comp> <id>1</id> <content>bar</content> </comp> <comp> <id>2</id> <content>foo</content> </comp> </test> I want to change the value of the content of the comp element with id 2. Therefore I loop with a foreach loop for each (var x ...

xml posting

i want to post an xml document to a url, using simple php code. i have a javascript code but the javascript will not support cross domain, so i just want to do it with php. does any one have a code for this to support me... ...

Silverlight C#: XML Serialization: System.InvalidOperationException: <tagname> was not expected

I'm trying to de-serialize an XML Document and when the desserializer encounters a certain tag about halfway down the doc, it gives the error: System.InvalidOperationException <mytagname> was not expected. It has a [System.Xml.Serialization.XmlArrayItemAttribute("MyTagName", typeof(MediaFile))] tag right before it in the class, and...

VS2008 - error in deserialization from web service

Hi, I have an error in deserialization from calling an operation in an external web service (https). The error is "Error in deserializing body of reply message for operation 'score'." Score is a credit score operation. The stack trace includes "There is an error in XML document (2, 157)." but I don't know how to get the XML document so I...

Streaming XPath evaluation

Are there any production-ready libraries for streaming XPath expressions evaluation against provided xml-document? My investigations show that most of existing solutions load entire DOM-tree into memory before evaluating xpath expression. ...

Visualising StackOverFlow!

Hey All, I recently downloaded the stack overflow xml dump, and began playing around with the files. I plan to develop some visualisations of the data, for the community of course, but I am wondering does anybody have any suggestions on how they would like to view or indeed interact with this data? Social Network Analysis springs to ...