xml

Help in XML Parsing with iPhone

Hi all, I need to parse the xml listed below in the iphone. can anyone help me in this. please...! Thanks in advance... <Assignments> <Course> <CourseName>Foundation of English</CourseName> <CourseGradePercentage>89</CourseGradePercentage> <AssignmentList> <Assignment> <AssignmentName>Foundations of English I</AssignmentName> ...

XmlReader - I need to edit an element and produce a new one

I am overriding a method which has an XmlReader being passed in, I need to find a specific element, add an attribute and then either create a new XmlReader or just replace the existing one with the modified content. I am using C#4.0 I have investigated using XElement (Linq) but I can't seem to manipulate an existing element and add an a...

Format XMl Document by adding "/" at the end of tag

So, i have some not well-formated xml document, some empty tags() don't have "/" at the end, example: <loader local="test.bat" dir="/usr/home"> And how can i elegant(using regex:)) add for each "loader" tag "/" at the of this tag(using Java); must be: <loader local="test.jpg" dir="/usr/home"/> ...

Does XmlMtomReader cache binary data from the input stream internally?

Actually i'd like to know if XmlMtomReader reads mime binary parts from the input stream directly? Or does it store them internally before i call ReadContentAsBase64() method? ...

How to use XML file internationalization (i18n) with Grails

Hi, I need to use XML file to store each key/value pair used by my app (instead of the usual properties file). Grails is using properties file by default to handle internationalization. What can I do to configure grails to read internationalization information in XML file? Thanks ...

Java SGML to XML conversion?

Hi, Does anyone know of a method, or library, to convert SGML into XML? EDIT: For clarification, I have to do the conversion in Java, and I cannot use the SP parser or the related SX tool. ...

C# xml read/write/xpath without using XmlDocument

I am refactoring some code in an existing system. The goal is to remove all instances of the XmlDocument to reduce the memory footprint. However, we use XPath to manipulate the xml when certain rules apply. Is there a way to use XPath without using a class that loads the entire document into memory? We've replaced all other instances...

How to get only required xpath elements?

Hi Guys, I have an xml file that I want to store a node's rank attribute in a variable. I tried: echo $var = $xmlobj->xpath("//Listing[@rank]"); to no avail, it just prints ArrayArray. How can this be done? if($xmlobj = simplexml_load_string(file_get_contents($xml_feed))) { foreach($xmlobj as $listing) { ...

How do I serialise a List<T> to XML using LINQ to XML?

I've this generic list List<zil> listKD = new List<zil> { new zil{day="Mon",c="1",S1="08:00",S2="08:40",S3="08:47"}, new zil{day="Mon",c="2",S1="08:50",S2="09:30",S3="09:37"}, new zil{day="Mon",c="3",S1="09:40",S2="10:20",S3="10:27"}, new zil{day="Mon",c="4",S1="10:30",S2="1...

Google mini xml returns 504 error code

Hi there, We have a Google mini indexing a client site returning results in XML format. Occasionally (1 in 1000 requests in my small sample) results XML is not returned but the following is instead: <?xml version="1.0" encoding="UTF-8" standalone="no"?> <!DOCTYPE GSP SYSTEM "google.dtd"> <GSP VER="3.2"> <ERROR>504</ERROR> </GSP> ...

How do I query XML stored as text?

I have a table in a SQL Server 2005 database that logs purchases like so: ID (PK, int, not null) Request (text, null) Response (text, null) MerchantId (varchar(14), null) Amount (money, null) The Request and Response fields are really storing XML. I can't change the data type to XML. I need to draw a query that will get data out of ...

XML parse sub-parents of root node

Here's books.xml, an xml that I'm trying to traverse: <?xml version="1.0" encoding="ISO-8859-1"?> <!-- Edited by XMLSpy® --> <bookstore> <book category="cooking"> <title lang="en">Everyday Italian</title> <author>Giada De Laurentiis</author> <year>2005</year> <price>30.00</price> </book> <book category="children"> <title lang="en">...

How do I send this SOAP XML in Perl?

I have to send the XML below. And i have no idea where to start. I know i need to look up SOAP in Perl but thats roughly it. <xs:element name="CheckDomain"> <xs:complexType> <xs:sequence> <xs:element name="domain" type="domainRef"/> <xs:element name="suggestions" type="xs:boolean" default="false" minOccurs="0"/> </xs:sequence> </x...

children element with namespace prefix were considered invalid by xerces

I use xerces to valid a xml instance against schema: parser.setFeature("http://xml.org/sax/features/namespaces", true); parser.setFeature("http://xml.org/sax/features/namespace-prefixes", true); parser.setFeature("http://xml.org/sax/features/validation", true); parser.setProperty("http://apache.org/xml/properties/schema/external-schemaL...

Proper XML formatting when viewing log file contents.

I am trying to read some logs through a Linux terminal which contain some XML, (the entire log is not XML, but some of it's contents is). Is there any text editors, add-ons or scripts which will attempt to format the the contents that is XML to make it easier to read. I dont need it to save the new formatting, just display it for easy ...

How to get individual identity in an XML Insert?

I haven't worked much with XML in SQL so I'll try to ask the question the best I can. Say I receive some structured XML in SQL for insertion. The structure might be: <Team> <Player> <Name>Player1</Name> <Games> <Game> <Date>9/7/2009</Date> <MinutesPlayed>90</MinutesPlayed> </Game> </Ga...

Xpath, retrieving node value

I get this return value from Sharepoint... which I have just included the first part of the xml snippet... <Result ID=\"1,New\" xmlns=\"http://schemas.microsoft.com/sharepoint/soap/\"&gt; <ErrorCode>0x00000000</ErrorCode><ID /><z:row ows_ID=\"9\" It populates a XmlNode node object. How using xPath can I get the value of ows_id ? M...

Converting XDocument to XmlDocument and vice versa.

It's a very simple problem that I have. I use XDocument to generate an XML file. I then want to return it as a XmlDocument class. And I have an XmlDocument variable which I need to convert back to XDocument to append more nodes. So, what is the most efficient method to convert XML between XDocument and XmlDocument? (Without using any te...

Problem validation a XML file with a local DTD file in C#

I'm triying to validate a XML file. I'm using this code XmlReaderSettings settings = new XmlReaderSettings(); settings.ProhibitDtd = false; settings.ValidationType = ValidationType.DTD; settings.ValidationEventHandler += new ValidationEventHandler(validationError); XmlSchemaSet schemas = new XmlSchemaSet(); settings.Schemas = ...

Parsing large pseudo-xml files in python

I'm trying to parse* a large file (> 5GB) of structured markup data. The data format is essentially XML but there is no explicit root element. What's the most efficient way to do that? The problem with SAX parsers is that they require a root element, so either I've to add a pseudo element to the data stream (is there an equivalent to Ja...