newbie xpath - mapping problem

Discussion in 'XML' started by iliad, Jan 23, 2006.

  1. iliad

    iliad Guest

    hi!
    i have the given xml and would like to transform it into html. how can
    i map the par-elements to the correct pardef-elements?
    thanks a lot!!

    ---------- XML Input ----------
    <richtext>
    <pardef id='1' ...some additional attributes... />
    <par def='1'>
    textbefore
    </par>
    <pardef id='2' list='bullet' ...some additional attributes... />
    <par def='2'>
    point1
    </par>
    <par>
    point2
    </par>
    <par>
    point3
    </par>
    <par def='1'>
    textmiddle
    </par>
    <par def='2'>
    point4
    </par>
    <par>
    point5
    </par>
    <par>
    point6
    </par>
    <par def='1'>
    textafter
    <par/>
    </richtext>

    ---------- HTML output ----------
    <P>textbefore</P>
    <P>
    <UL>
    <LI>point1</LI>
    <LI>point2</LI>
    <LI>point3</LI>
    </UL>
    </P>
    <P>textmiddle</P>
    <P>
    <UL>
    <LI>point4</LI>
    <LI>point5</LI>
    <LI>point6</LI>
    </UL>
    </P>
    <P>textafter</P>
     
    iliad, Jan 23, 2006
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Marvin_123456

    "Memory leak" in javax.xml.xpath.XPath

    Marvin_123456, Jul 29, 2005, in forum: Java
    Replies:
    4
    Views:
    2,010
    jan V
    Jul 29, 2005
  2. Alastair Cameron
    Replies:
    1
    Views:
    7,480
    SQL Server Development Team [MSFT]
    Jul 8, 2003
  3. Anna
    Replies:
    0
    Views:
    555
  4. goog
    Replies:
    0
    Views:
    527
  5. Tjerk Wolterink

    XPath: efficiency in xpath expressions

    Tjerk Wolterink, Nov 13, 2004, in forum: XML
    Replies:
    1
    Views:
    1,679
    Richard Tobin
    Nov 13, 2004
Loading...

Share This Page