Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: [xml-dev] best xml parser to use

From: "K. W. Landry" <kwlandry@-----.--->
To: petera <peter.anderson@--------.--->
Date: 9/6/2006 8:09:00 PM
If you're coding in Java I'd suggest xmlbeans. I've found xmlbeans fast, easy, quick to employ; very handy in about half a dozen projects now. 
 
You need to compile the schema which returns java code that will then allow you to directly reference any element. Then, simply reference the invoice structure's topmost element, and then do as you wish, either write the xml to the queue as simple text, or create a new xml document (just provides the xml header at the start of the file) and add only this copied element to it and write to the queue, or strip all or selected, etc..., etc..., and write to the queue and iterate to the next invoice or batch file. It could be 20 lines of code tops. 

 
If you don't have a schema to feed into the schema compiler there are a couple of tools that you can build a schema and a couple that infer schema from sample xml. 
 
KWL

 
On 9/6/06, petera <peter.anderson@e...> wrote:

Hi

I have a particular problem to solve:

I have an xml batch file that contains individual xml invoices. I need to

extract these xml invoices one at a time and
place them on a message queue i.e. I just need to get all the data between
the invoice start and end tags put it
in a string and place it on a message queue (validation occurs on the

invoice itself on the receiver side).

What is likely to be my best approach, DOM (unlikely I guess), SAX, StAX or
simply writing a java program using indexOf, in terms of performance ?


TIA Peter


--
View this message in context: http://www.nabble.com/best-xml-parser-to-use-tf2226882.html#a6171113
Sent from the 
Xml.org Dev forum at Nabble.com.


transparent
Print
Mail
Like It
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