xml

missing ; before statement in an xml response?

I cant seem to figure out why I am getting that error "missing ; before statement" in this part of my xml response... <?xml version="1.0" encoding="utf-8"?> <Response xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" Time="2010-02-05T06:56:30" xsi:noNamespaceSchemaLocation="/config.xsd"> any ideas? ...

SimpleXML returning multiple objects, how can I get the data?

I'm using simpleXML to parse this xml file. It's a feed I'm using to access the YouTube API. I want to embed the most recent video in an object and display the next four thumbnails. So I'm using simplexml_load_file on this, going using a foreach loop to access the values in each feed. I can access the values no problem, but I run into ...

cross domain XML response issue

Ok so I found a plugin from here: http://github.com/jamespadolsey/jQuery-Plugins/tree/master/cross-domain-ajax That is supposed to return an xml feed that is not on my local server which would usually not work due to a cross domain policy error. And i'm supposed to be able to use a normal jquery GET call. I have included the plugin co...

XmlHTTPRequest: "XML Parsing Error: no element found"

So I'm using PHP+MySQL to deliver database contents in XML to a JavaScript. $xml = "<?xml version='1.0' encoding='utf-8'?><confessions><pending>"; $pending = $m->MySqlHandler->Query("SELECT id, gender, age, confession, date_posted FROM confessions WHERE publish = 0"); foreach ($pending->Rows as $pr) { list($id, $gender, $age, $confe...

RapidXML, reading and saving values

Hello, I've worked myself through the rapidXML sources and managed to read some values. Now I want to change them and save them to my XML file: Parsing file and set a pointer void SettingsHandler::getConfigFile() { pcSourceConfig = parsing->readFileInChar(CONF); cfg.parse<0>(pcSourceConfig); } Reading values from XML void ...

Why does XSD say my element is not complete?

I have an XSD of this form: <?xml version="1.0" encoding="UTF-8"?> <schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.example.org/example" xmlns:tns="http://www.example.org/example" elementFormDefault="qualified"> <complexType name="bType"> </complexType> <complexType name="aType"> ...

Best way to handle a lot of ints

I have an array of about 10-100k ints that I need to store (as compressed as possible), and retrieve back to the complete array the fastest way possible. What is the best way to handle this type of thing in a language like c#. ...

skip certain objects in xml feed using php

I am using php xpath to get the values from the below xml feed and php the function. <FOUND> <IMAGES> <IMAGE> <SMALL>images/small.jpg</SMALL> <MED>images/med.jpg</MED> <LARGE>images/large.jpg</LARGE> <EXTRAL>images/extra.jpg</EXTRAL> </IMAGE> <IMAGE> <SMALL>images1/small.jpg</SMALL> ...

Read xml string into textbox with newline

I have a class with a member "Address" that I read from an XML file that has the following format(fake address - The XML field name is "Address" - not shown): 106-1190 Crescent St. \r\n Toronto Ont \r\n V2K 2Z6 I have created a Multi-Line Textbox to display in a form with the Accepts-Return property set to true. The Textbox displays t...

stuck binding xml to Model Class

I am experimenting with using xml as a database for small CMS, like gallery or staff profiles etc however being all subsonic minded i am stuck on how i bind my xml document to a modelclass so that i can then use that class for strongly typed views: here is my model class: [XmlRoot("employee")] public class EmployeesModel { [Req...

Read XML from Youtube Videos

Hello how i can read XML from youtube $xml = new XMLReader(); $xml->open('http://gdata.youtube.com/feeds/api/videos/1uwOL4rB-go'); $r = array(); while($xml->read()) { $r[] = array($xml->name => $xml->value); } i got this far but it doesnt get the necesary info i need like video duration.... ...

Problem with DOMXPath query in PHP

I have a got piece of HTML code: <form method="post" action="/"> <input type="hidden" name="example-name" value="example-value"> <button type="submit">Submit</button> </form> How can I extract value of the hidden input using DOMXPath in PHP? I have tried somethig like this: //$site - the html code $doc = new DOMDocument(); $doc->...

Xpath Sorting from XML Document

I have a Xml Document and it is contains some date datas like; <Message> <messagetext>Testing purpose only</messagetext> <date>05.02.2010</date> </Message> I want them sorted with a XPath key, how can I get if anyone knows about pls help me thanks all regards ...

Parsing XML with BeautifulSoup and handling missing element

I am using BeautifulSoup to parse XML: xml = """<person> <first_name>Matt</first_name> </person>""" soup = BeautifulStoneSoup(xml) first_name = soup.find('first_name').string last_name = soup.find('last_name').string But I have a problem when there is no last_name, because it chokes. Sometimes the feed has it, and sometimes it doesn...

How to read an xml file in flex actionscript 3

Hi, I want to read an xml file placed in the same folder as the swf. Note however there is no webserver running. <![CDATA[ private var my_req:URLRequest = new URLRequest("assets/GmetadOutput.xml"); private var loader:URLLoader; public function startup():void { output.t...

Bind an ASP.NET TreeView to SqlDataSource using an XML query

Is it possible to use a SQL query that returns XML, in order to bind a TreeView control to SQL data? In other words, I would like to set up a query that presents table data as hieracrhical XML, and bind this XML to the TreeView. ...

XSLT for MS Test code coverage result file

Do you know some nice XSLT for transforming the code coverage XML output from the Visual Studio (I'm using the 2010 Ultimate Beta) into an HTML report that I could put on a webpage ? I have found an article which could get me started but their example is just a simple one that doesn't contain all the hierarchical drill-down information a...

creating dynamic view, multiple a view X times, get/set value for each group

I have a base view in XML. <RelativeLayout android:id="@+id/RelativeLayout01" android:layout_width="fill_parent" xmlns:android="http://schemas.android.com/apk/res/android" android:layout_height="wrap_content"><TextView android:layout_height="wrap_content" android:layout_width="fill_parent" android:text="Family" android:id="@+id/Fam...

How can I solve this exercise?

This is xml code and I want to write code with javascript using DOM to get the father, mother, daughter and son names ------->(ali,mona,ghada and mohamed) Can any one help me? <family> <grandfather>Ibrahim <father job="Engineer">Ali <mother>mona</mother> <daughter age="23" job="ITI stud...

python xml error

hello . I'm new to xml. I'm trying to parse an xml file to extract data from, but it shows the error below message when I call doc=minidom.parse('D:\\CONFIGRATION.xml') ... xml.parsers.expat.ExpatError:not well-formed (invalid token): line 474, column 15 473 <Extras> 474 <extra Type> 475 jpg 476 </extra Type> 477 <extr...