xml

Maintaining an Adobe Air Desktop Application with an XML Document

i am going to be utilizing a flash/jquery powered gallery on a webpage that is maintained and updated with an xml document. the xml data is used to add and sort images into a grid of small thumbnail images. i will customize this component so that when the user rolls over a thumbnail it will trigger jquery to replace a div using hide/show...

forcing attribute in XSD Schema to be the primary key ( and sorted)

In the XML shown below, Is there a way to create a schema that will describe the XML so that the id value will increase by 1 with the addition of each Book node. The goal is to use id as a primary key whose minimum value = 1. Also, id values should be are sorted in an ascending manner. <Books> <Book id="1"></Book> <Book id="2">...

Create Valid XML from XSD Loaded at Runtime (without xsd.exe)

Possible Duplicate: Programmatically Create XML File From XSD XML instance generation from XML schema (xsd) How to generate sample XML documents from their DTD or XSD? Here's the scenario: I've created an application that hooks into a commercial CRM product using their web service API, which unfortunately has a di...

What is the easiest way to populate an object's attributes from an XML response message?

I have a fair bit of experience working with the iPhone SDK. I have a couple fully developed apps including a utility application for tracking data and a board game. I would consider myself a novice on the iPhone SDK. I also have no issues with reviewing documentation and examples for hours until I understand something, as long as the do...

How to stop Eclipse from trying to run XML files?

I'm mostly using Eclipse for Android development these days, and have developed good muscle memory for Ctrl-F11 to run my app. Problem is, if I happen to be editing an XML file (like manifest or layout) when I hit that key combination, Eclipse does something that I find inscrutable... It attempts to "run" my XML file, creating an erroneo...

how to get horizontal depth of a node ?

note i made up the term horizontal depth to measure the sub-dimension of a node within a tree. so imagine a which would have xpath something like /html/table/tbody/tr/td, and "horizontal depth" of 5 i am trying to see if there is a way to identify and select elements based on this horizontal depth. how can i find the maximum depth ? ...

How can i control Item Count while reading xml Xpath() command in C#

Hi , i have got a news section in my website. I can Insert news to my XML file , than shows them in main page.There are so many news in my xml file.I showing them with Xpath("content") command.So i can restrict item count with xPath command.Is there anyway to Paging or Max Items option for this usage ? XML File; <?xml version="1.0" e...

Is there an Android XML reference?

Hi, I'm learning to develop applications for Android but I need to know the XML tags to get my programs to work. They are documented in the javadoc but I would prefer a quick reference. EDIT: I was talking about the Android GUI XML-files, sorry that I didn't make this clear. ...

Restriction Content and Attributes in XST: ComplexTypes

I am making an XML schema for an XML document* and I am getting stuck on something which seems like it should be relatively simple to do. Take the following XML snippet: <some_element value="Yes" type="boolean">1</some_element > In this case, I want to restrict the content of some_element to boolean values (xs:boolean) and I want to ...

Google Search that Returns XML

I want to do a Google search that returns an XML document (instead of html). Is that possible? ...

How can i get Last xx item from XML file with Xpath() query in C#?

Hi, how can i get Last added 5 item's node from my XML file with Xpath ? this is not what i want .. its gives First 5 item , i wanna get last 5 item XPath="/newsSection/news[position()<=5] thanx for ur helps. ...

Access an element's parent with PHP's SimpleXML?

I'm iterating through a set of SimpleXML objects, and I can't figure out how to access each object's parent node. Here's what I want: $divs = simplexml->xpath("//div"); foreach ($divs as $div) { $parent_div = $div->get_parent_node(); // Sadly, there's no such function. } Seems like there must be a fairly easy way to do this. ...

Replace xml nodes and attributes with php

I have a "stuff.xml" file which basically looks like this: <?xml version="1.0" encoding="utf-8"?> <mystuff> <pic id="pic1" _level="1" _xpos="50" _ypos="50" _width="150" _height="150"> image.jpg </pic> </mystuff> And what I need is three php files: "image.php", "pos.php", and "size.php" which ba...

Ruby Hash & Array to xml

I'm using ActiveSupport's to_xml to generate some xml from a hash. I have need for the this ruby: :Shipment => { :Packages => [ {:weight => '5', :type => 'box'}, {:weight => '3', :type => 'tube'} ] } To generate this xml: <Shipment> <Package> <weight>5</weight> <type>box</type> </Package> <Package> <wei...

Find if node has siblings using simplexml

I am try to find if a certain node has siblings, and if it does, I would like to know what those siblings are. Is this possible? ...

html tags inside xml via php

I am trying to put an html string inside of xml with php like this: <?php $xml_resource = new SimpleXMLElement('stuff.xml', 0, true); $xml_resource->content = '<![CDATA[<u>111111111111111111111111111111111 text</u>]]>'; $xml_resource->asXML('stuff.xml'); ?> but for some reason my xml file looks like this: <?xml version="1.0"?> <data>...

XML Parsing issue in Flex

Hi, I have an XML with more than 10,000 lines,when i am parsing that xml using URLLoader class.i am unable to trace the entire xml.While tracing i am getting xml from the middle.can anyone suggest me how to parse the xml document. Thanks in Advance ...

What characters must be replaced when inserted in the <description> of a RSS feed?

Hi, I'm making a RSS feed. I was looking at the official example and I noticed that some characters, such as < and > were replaced with &gt; and &lt;. I therefore assume that & must also be replaced with &amp;. Are there other characters that I must escape before copying them in the description? Note that the description text comes fro...

How do I generate XML from XMLBuilder using a .xml.builder file?

I have started using xml builder templates for most of my model. I need to find a generic way to build XML outside of a render which uses the .xml.builder template instead of the generic .to_xml method provided in the model I gather that I will have to override the default to_xml (or add a to_my_xml), but I am unable to see how to get X...

How to call XML api

Hello, I have a set of XML API's ( XSD ) files. I want to call them from C++ and C# programs. These are two different applications. I want to get data by calling the api. I would also like to know something about XML RPC Can someone please let me know how do I call the XML api from C++ and C#. Thanks Sujay ...