xml

I need to exchange data with different programs in text format what do you suggest ?

Hello, Our program needs to import/export data from/to different programs, each from specific independant proprieties. Most of these companies would send 2 text files: the first consisting of the data content along with a second one holding descriptions. Suppose this example: content file: TheArtofDeceptionKevin11.53 Description file:...

As3 reading xml, creating objects and storing them in an array

Hi, I have a xml with the following structure: <NODES> <NODE> <NAME> </NAME> <IMG> </IMG> </NODE> <NODE> <NAME> </NAME> <IMG> </IMG> </NODE> </NODES> And im getting it into flash as so: var loader:URLLoader = new URLLoader(); ...

help with grouping and sorting for TreeView in xaml

I am having problems getting my head around grouping and sorting in xaml and hope someone can get me straightened out! I have creaed an xml file from a tree of files and folders (just like windows explorer) that can be serveral levels deep. I have bound a TreeView control to an xml datasource and it works great! It sorts everything alp...

How to cache an xml file and read its attributes in Rails?

Hello, I have a file that represents all components of a game. I want to load the file into cache on boot, then have the ability to call the attributes of the file from the controllers. How do I begin? ...

How to Transform XML with XSLT using PHP in Wordpress

Right now I transform an XML document with an XSLT stylesheet using Javascript (in a Wordpress-based website). This works fine in Firefox and Chrome, but not in IE. Plus, if Javascript is not enabled, nothing would show up. So, my goal is to do the XML/XSLT transformation to XHTML on the server, not the client, preferably using PHP. I'...

System.InvalidOperationException was unhandled - XMl Serialization C#

Hi I made an xml document by using XML Serialization. It looks like this <?xml version="1.0" encoding="utf-8"?> <Course xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt; <courseName>Comp 1510</courseName> <backgroundColor>#ffffff</backgroundColor> <fontColor>#ffffff</fontColor...

Convert large XML file to CSV in PHP

I have a 50MB XML file. I want to convert it to a CSV file, but most methods I have found exhaust the server memory. Is there a good way to do this using a stream method such as XMLreader. ...

PHP: Using simplexml to loop through all levels of an XML file

I have a function which uses simplexml to return the first level of nodes in an XML file and write it into an unordered list: function printAssetMap() { $xml = simplexml_load_file(X_ASSETS); $assets = $xml->asset; $html = '<ul>'."\n"; foreach ($assets as $asset) { $html .= '<li id="asset'.$asset->asset_assetid.'"...

Python: xml.dom.minidom empty nodeValue nonempty toxml() value

I have a line that gets the nodeValue of a Node: parent.getElementsByTagName("Url")[0].nodeValue that returns nothing: <br/> When I do: parent.getElementsByTagName("Url")[0].toxml() it returns: < Url>www.something.com< /Url> I am not sure what is going on here. Another data point: when I do nodeName instead of nodeValue it re...

HTML/XML Parser for Java

Hello, What HTML parsers have the following features: Fast Thread-safe Reliable and bug-free Parses HTML and XML Handles erroneous HTML Has a DOM implementation Supports HTML4, JavaScript, and CSS tags Relatively simple, object-oriented API What parser you think is better? Thank you. ...

How to insert XML comments in XML Serialization?

Hi I want to add at the top of my xml file some notes for the user who reads it. I am not sure how to do this though with xml serialization. I was looking at this post http://stackoverflow.com/questions/2086326/c-xml-insert-comment-into-xml-after-xml-tag XDocument document = new XDocument(); document.Add(new XComment("Product XY Vers...

Accept Data With A Webservice C# .NET 3.5

I was curious as to how I would accomplish the following with webservices: Authenticate a user. Accept a CSV or XML file. Process the file and put it into an SQL database. Someone mentioned in a previous post that I should use a webservice. I can't seem to find any resources that explain how to begin something like this. All the si...

Using simplexml to get a node (and its children) by attribute

Using simplexml, is it possible to get the children of a node based on the parent's attributes. For example, I want to get a list of the variants in myItem1 (output would be small, large) Here is some psuedo code of what I'm after: foreach($xml->xpath('//family[@name="myItem1"]')->variants->children() as $child) { $child->getName()...

Sort through all attributes in XML tree with PHP XMLReader

I have some PHP code to turn an XML file into a CSV file. During testing, I am not creating a CSV file, just echoing the results in a CSV format. Whenever XMLReader reaches an empty element, it outputs all the attributes of the element. 1) Is there a way to output the attribute name with it's values i.e. (is there an $xml->AttributeNa...

Why is ampersand being interpreted as children on text node.

I have an xml file that I am parsing and I have the following tag... <desc> /wap/news/text.jsp?sid=242&nid=5662369&cid=5038&scid=-1 </desc> I don't have control over the format of this xml file but I need to interpret the desc content as a partial url that I will later append to a base URL and retrieve a new file. When I parse this t...

xml file updation in android

I want to do an application in which I want to store setting of my application in xml so in need to update xml file (updating values of nodes , removing nodes,appending nodes).In java we will update xml file using javax.xml.transform package classes but it is not available in android so is there any way to update xml(If you know the rea...

How does the xml:lang & lang attribute affect the rendering of XHTML Strict 1.0 pages ?

I peeked inside the source of a public website which uses the XHTML 1.0 Strict DOCTYPE and noticed that it specifies two attribute related to the language of the page. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ja" lang="ja"> The page is in Japanese by the way. My question is this:- I suspect that the attribute xml:lang & ...

xslt grab value from other node

I have two xslt dynamic drop down boxes and need a test statement that will test if the other one has been used. <xsl:template match="cat"> <xsl:choose> <xsl:when test = (if dog has already been selected) <select id="selectCAT"> <option value="" onchange="submitCAT()"> <option value="shorthair"> ...

XML Loading in flash not working on facebook.

Hi, I have a flash file which calls up a url say http://test.com/createXML/ which is caught and used up by a python/django code and it creates and redirects to an XML. which is loaded by flash, to get values from the database. The setup works fine when outside facebook, but as soon as I put the setup in facebook, it stops loading the X...

Load XML for each request .

My application loads a xml and update xml elements for each request. I have 10 to 20 requests come at a time , the xml loading process is taking some time for each request because it is in synchronized block. The xml size is 500 KB and used DOM parser (Legacy code). Are there any ways to improve performance? ...