[jdom-interest] Can someone help me with this problem?

Grzegorz Kaczor grzegorz.kaczor at gmail.com
Tue Mar 11 12:53:07 PDT 2008

it depends how many elements you want to transform this way. You canuse JDOM to parse the whole input and then generate output XML. Seehttp://www.jdom.org/docs/oracle/jdom-part1.pdf, page 2, for someinformation on how parsing can be done using JDOM. In general, in thisarticle you will find a lot of useful info, still up-to-date despiteits age :).
However, if you are only transforming XML to XML you may want to havea look at any XSLT processing engine (or even XQuery), like Saxon(http://saxon.sourceforge.net/), or even libxslt Linux command linetool xsltproc. Then you define a transformation XSLT stylesheetwithout coding any Java.
2008/3/11, Ramo At Skuff <ramo at skuff-band.de>:> Hi,>> i don't konw how to search "from" the element "formelement" the childs from> "formelement", get this values, the cdata section, and write it as a> ttribute into the parent element.>>> Is there a hint?>> Greetings> Ramo>> ||-----Ursprüngliche Nachricht-----> ||Von: Grzegorz Kaczor [mailto:grzegorz.kaczor at gmail.com]> ||Gesendet: Dienstag, 11. März 2008 17:09> ||An: Ramo At Skuff> ||Cc: jdom-interest at jdom.org> ||Betreff: Re: [jdom-interest] Can someone help me with this problem?> ||> ||Well, just write code that will do it :). Yes, JDOM, is suitable.> ||> ||Regards,> ||GK> ||> ||2008/3/10, Ramo At Skuff <ramo at skuff-band.de>:> ||> Hi,> ||>> ||> i have the following Problem:> ||>> ||> this is a part of my xml file:> ||>> ||> <FormElement type="tx" character="text" id="tx_00_user"> ||name="tx_00_user"> ||> tabmember="UserName" mandat="y"  size="20" >> ||>        <kindelement><![CDATA[ tmp(); ]]></kindelement>> ||> </FormElement>> ||>> ||> >From this, i want to generate something like this:> ||>> ||> A snippet of html:> ||> <input type="text" id="tx_00_user" name="tx_00_user"> ||class="mandatory"> ||> size="20" value=" tmp(); " />> ||>> ||>> ||> The result i get ist he following:> ||> <input type="text" id="tx_00_user" name="tx_00_user"> ||class="mandatory"> ||> size="20" />> ||>> ||> My problem ist to get the value attribute in it. Is it possible mit> ||SAX/JDOM> ||> to get this solved?> ||>> ||> I would be thankful for any help!> ||>> ||> Many thanks> ||> Ramo> ||>> ||>> ||>> ||> _______________________________________________> ||> To control your jdom-interest membership:> ||> http://www.jdom.org/mailman/options/jdom-> ||interest/youraddr at yourhost.com> ||>> ||> ||> ||--> ||"Choć tyle wiemy własnym doświadczeniem:> ||W nas jest Raj, Piekło - i do obu - szlaki."> ||J.K.>>> _______________________________________________> To control your jdom-interest membership:> http://www.jdom.org/mailman/options/jdom-interest/youraddr@yourhost.com>

-- "Choć tyle wiemy własnym doświadczeniem:W nas jest Raj, Piekło - i do obu - szlaki."J.K.

More information about the jdom-interest mailing list