Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > XML > newbie xpath - mapping problem

Reply
Thread Tools

newbie xpath - mapping problem

 
 
iliad
Guest
Posts: n/a
 
      01-23-2006
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>

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
"Memory leak" in javax.xml.xpath.XPath Marvin_123456 Java 4 07-29-2005 03:49 PM
[ANN] Stylus Studio 6 Adds new Support for XSLT 2.0, XPath 2.0, XQuery,XML Schema, Legacy Data Integration and XML Mapping Stylus Studio XML 0 10-05-2004 06:17 PM
Are there any XPath parsers that generate XPath trees? goog XML 0 01-14-2004 01:47 PM
XPath that does not include other XPath Anna XML 0 07-31-2003 07:55 AM
Problem selecting a node with XPATH if attribute value contains backslashes - how to force XPATH string to be treated as literal? Alastair Cameron XML 1 07-08-2003 07:24 PM



Advertisments