|
From: Bruce M. <br...@mc...> - 2003-04-25 00:44:06
|
On Thursday 24 April 2003 05:44 pm, ek...@ba... wrote: > This might sound simple to you, but I am trying to do something basic and > want to verify. > > My input to babeldoc is an XML string. I want to be able to reference > tags from the XML String from within the stages of the pipeline. One of > my PipelineStages is the Script stage (I am using Jython). I want to Jython - ewwww. Kidding. > reference some of the XML tags from within the script but have had no luck > using document.get(<tagName>). > > A few questions: > 1. Should I be using the XPath Pipeline Stage to extract the wanted tags > and use document.put(<tagName>,<tagValue>) so that my later Script stage > can use document.get(<tagName)? Correct. 2. If so, where would I find some decent documentation/examples for coding > XPath? Take a look at the higgs bros or the other big example. > 3. Should I use the Enrich Pipeline Stage instead? Enrich is possible too - but enrich does not use XPath to get data out of the xml document. Its more for adding ancilliary enrichments - date, userdirectory, scripts, etc, etc. > 4. Is there a better way to do this than my above approach? No. > > Thanks in advance. > > ________________________________________________________________________ > The information in this e-mail, and any attachment therein, is confidential > and for use by the addressee only. If you are not the intended recipient, > please return the e-mail to the sender and delete it from your computer. > Although The Bank of New York attempts to sweep e-mail and attachments for > viruses, it does not guarantee that either are virus-free and accepts no > liability for any damage sustained as a result of viruses. |