xml

Copy one xml document to another using DOM

Hi guys, this is my situation: I have two org.w3c.dom.Document created from two xml files. What I want to obtain is brand new Document containing all the data of the two xml Document. Do you have any idea on how to do this? Thanks! Rob ...

xml parsing in Objective c

NSString * myxml=@" 2 006Cbm5ubm53bm53bndub 6 00BCbndub8 7 "; how can parse this string in Objecive c.. pls help me .. thanks and regars.. raju ...

simplexml_load_file() error in php

I have created a test xml whose content is in gujrati using php $doc = new DomDocument('1.0','UTF-8'); $fieldvalue = mb_convert_encoding($question['questiontext'],'ISO-8859-1','UTF-8'); $value2 = $doc->createTextNode($fieldvalue); XML file is created successfully but when i try to use simplexml_load_file function to render the XML ...

Adding attributes to an XML node

Sorry to ask such a silly question, but I got stuck up .......... I need to create a xml file dynamically, the structure of that file is--> <Login> <id userName="Tushar" passWord="Tushar"> <Name>Tushar</Name> <Age>24</Age> </id> </Login> I am not able to create the attributes inside the root tag (ie userName="" and p...

What have all the AJAX frameworks to do with AJAX?

With the upcoming rise of AJAX applications on the web, I wrote some own pieces of code to understand what it is about. I know there must be easier ways than directly dealing with the XMLHttpRequest object and thought this is why all the AJAX frameworks were created. However, when I had a look at some of them, I mostly found documentati...

How to add an attribute to a serialized XML node?

Assume I have a C# class like this: [XmlRoot("floors")] public class FloorCollection { [XmlElement("floor")] public Floor[] Floors { get; set; } } And I want to serialize it and send to a REST API using WCF. But before sending I need adding an attribute to the floors node in this way: <floors type="array">...</floors> Any id...

create an unordered list with jquery using xml

Hi Folks, I have an xml file which i want to convert to an unordered list using jquery. so far I managed to get the list working, except for the third level of the xml. Currently my code writes all child items of 'Navigation_sub_3'. What I'm trying to figure out is how to write only the child nodes that are in level_2, so the output wou...

Usage of XSD occurrence Indicators

XML Schema specifies "occurrence indicators" (maxOccurrence, minOccurrence). Is there a "best pratice" in which elements (xsd:element, xsd:sequence or xsd:all) these indicators should be used? Example: either <xsd:element name="XList"> <xsd:complexType> <xsd:sequence> <xsd:element name="X" type="xsd:token" minOccurs="...

Benefits of databases as opposed to XML in a lightweight shopping site?

I have a lightweight online shopping site based on JSP and XML, and I'm wondering what the particular weaknesses of this system are as opposed to, say, PHP and MySQL? I know JSP can use Java APIs, but I feel PHP has a more "natural" relationship with HTML and also has the benefits of being dynamically typed, and is far more widespread a...

Add certain namespace to a SOAP Envelope in PHP

Hey ! I really need to add a certain namespace to a SOAP Envelope which is not specified in the WSDL for some reason I already tryed using the 'uri' parameter in the SoapCliente constructor but it's not working how can I add this namespace to the SoapEnvelope ? thanks in advance ...

Is it possible to access the content of a xml object using dot syntax?

Hello I am using LibXML to parse an rss feed and I am wondering if is possible to access the content within using dot syntax (or just as easy). So if I have: <post> <created_at>Sat Aug 09 05:38:12 +0000 2008</created_at> <id>882281424</id> <text>I so just thought the guy lighting the Olympic torch was falling when he began to r...

Java appending XML docs to existing docs.

I have two XML docs that I've created and I want to combine these two inside of a new envelope. So I have <alert-set> <warning>National Weather Service...</warning> <start-date>5/19/2009</start-date> <end-date>5/19/2009</end-date> </alert-set> and <weather-set> <chance-of-rain type="percent">31</chance-of-rain> <conditi...

XML: what processing rules apply for values intertwined with tags?

I've started working on a simple XML pull-parser, and as I've just defuzzed my mind on what's correct syntax in XML with regards to certain characters/sequences, ignorable whitespace and such (thank you, http://www.w3schools.com/xml/xml_elements.asp), I realized that I still don't know squat about what can be sketched up as the following...

Recursively parsing XML in Actionscript 2

I'm looking for an efficient and reusable way to parse xml into an object in actionscript2. The xml structure itself might change so it's important that im able to parse the xml with out 'hard coding' specific nodes, etc. I normally use As3 and wouldn't need something like this since the XML class is easy to drill down into. Below is AS...

Modify xml element name in SQL Server

I want to change element name with following statement: SET @myDoc.modify('replace value of (/CustomerInfo)[1] with "Customer"') from <CustomerInfo>     <ID>1</ID> </CustomerInfo> to <Customer>     <ID>1</ID> </Customer> But failed. So how can i change it just in sql ? ...

Transforming XML to XML with XSLT - ugly ColdFusion export.

I have a following XML structure that I need to transform: <recordset rowCount="68" fieldNames="ITEM,ECL,LEAD_TIME" type="**coldfusion.sql.QueryTable**"> <field name="ITEM"> <string>ITEM_A</string> <string>ITEM_B</string> <string>ITEM_C</string> </field> <field name="REV"> <string>A</string> <string>B</string> <string>C</string> <...

Generating objects in PHP using REST

I am trying to make a decision whether I should use a REST service or a SOAP service for some web facing functions that I am producing. This decision is based on whether I can easily use the REST service in implementation. I would prefer to use REST, though I don't want to spend days coding the object model in PHP. The services are bein...

Updating an array before MySQL insert?

Hi, I'm receiving an XML via php://input and after using simpleXML to break the elements down into variables and then what I want to do is append an array, or create an array of the variables every 30 seconds or so. The reason is this script will be getting regular inputs, and rather than doing loads of mySQL updates or inserts, I assu...

How to find a specific xml node?

i have this problem to find a particular xml node l have post this problem on stackoverflow and some nice fellows suggested xpath. I am an xml newbie . please I need an c# code to find the parent , parent, parent as (great grand parent) then the first child ,lastchild , lastchild . the code have to iterate up the tree and down again. B...

Convert xml to xsd using java

I am looking for a tool or java code or class library/API that can generate XSD from XML files. (Something like the xsd.exe utility in the .NET Framework sdk) ...