0100100101100110001000000111100101101111 0111010100100000011000110110000101101110 0010000001110010011001010110000101100100 0010000001110100011010000110100101110011 0010110000100000011110010110111101110101 0010000001100001011100100110010100100000 0110000100100000011011100110010101110010 0110010000100000011011000110100101101011 0110010100100000011011010110010100101110 0010000001000011011011110110111001100111 0111001001100001011101000111001100100000 00100001
- Mood:
amused
Remember this?
Remember the xml code? Dave ,
csixty4, suggested some for-each statements. I played around with it for a few hours and was finally able to grab the pattern and output I desired. I'll share the results for any google surfers!
Here it is sample.xml:
( sample.xml )
Here is the Transformation XSLT sample.xsl
( sample.xsl )
Here is the output file sample.txt
( sample.txt )
Remember the xml code? Dave ,
Here it is sample.xml:
( sample.xml )
Here is the Transformation XSLT sample.xsl
( sample.xsl )
Here is the output file sample.txt
( sample.txt )
- Mood:
accomplished
I've been having to do an XML project at work and I was wondering if anyone else who reads this has had experience in transforming xml using XSLT stylesheets to transform xml into plain text.
I've had success in such simple elements in xml format, but am stuck again when the file is more complicatied such as:
<parent>
<child1>
<tag>value</tag>
<tag>value</tag>
<grandchild1>
<tag>value</tag>
<tag>value</tag>
</grandchild>
<grandchild2>
<tag>value</tag>
<tag>value</tag>
</grandchild>
</child1>
<child2>
<tag>value</tag>
<tag>value</tag>
<grandchild3>
<tag>value</tag>
<tag>value</tag>
</grandchild>
<grandchild4>
<tag>value</tag>
<tag>value</tag>
</grandchild>
</child2>
.....
</parent>
*Note the tag elements are different names, but this pattern is repeatedly defined, of course.
So I want it to look like this
as a plain text output , deliminted by a special character such as | . (note the bullets are not output!). I don't want the tags themselves to be output, only the values
I've had success in such simple elements in xml format, but am stuck again when the file is more complicatied such as:
<parent>
<child1>
<tag>value</tag>
<tag>value</tag>
<grandchild1>
<tag>value</tag>
<tag>value</tag>
</grandchild>
<grandchild2>
<tag>value</tag>
<tag>value</tag>
</grandchild>
</child1>
<child2>
<tag>value</tag>
<tag>value</tag>
<grandchild3>
<tag>value</tag>
<tag>value</tag>
</grandchild>
<grandchild4>
<tag>value</tag>
<tag>value</tag>
</grandchild>
</child2>
.....
</parent>
*Note the tag elements are different names, but this pattern is repeatedly defined, of course.
So I want it to look like this
- child1_tag child1_tag grandchild1_tag grand_child1_tag
- child1_tag child1_tag grandchild2_tag grand_child2_tag
- child2_tag child2_tag grandchild3_tag grand_child3_tag
- child2_tag child2_tag grandchild4_tag grand_child4_tag
- .......
as a plain text output , deliminted by a special character such as | . (note the bullets are not output!). I don't want the tags themselves to be output, only the values
- Mood:
confused
