Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: Convert XML to String

From: Martin Honnen <mahotrash@-----.-->
To: NULL
Date: 1/1/2005 1:07:00 PM

Sameer wrote:


> I have a XML data string which is based on a XML Schema. I want to transform 
> this XML data into a normal string . This output string is then send to some 
> third party service using sockets.
> Now the response I get back is also a string which I want to transform back 
> to XML based on my XML Schema.
> 
> [ I have a mapping table which tells me which element corresponds to what 
> position in the Request string and Response string]
> 
> Please let what can be most effective way to achieving the above process 
> [i.e XML->String and String-> XML].

It is possible to send XML over HTTP so it would be easier not to make 
any transformation. But if the third party service wants some other 
format than XML and you can't change the format then you need to 
implement the transformation.
To transform XML to text you can use XSLT, it has an output method
   <xsl:output method="text" />
Of course it is also possible to use the DOM to exctract text data from 
an XML document.
With the transformation back you are on your own and need to look at the 
text parsing tools your favourite programming language/toolkit provides.

-- 

	Martin Honnen
	http://JavaScript.FAQTs.com/


transparent
Print
Mail
Digg
delicious
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent