|
List Info
Thread: walking the xml document tree
|
|
| walking the xml document tree |

|
2008-09-27 08:30:38 |
|
I have an xhtml document in an nclob or xmltype.
(Can put it in some other data/object type if I need to and
you tell me what it should be. J )
One possible algorithm I could use to solve my problem would
be to walk the node tree, looking at each node, one after another.
Is there an easy way to do that in pl/sql? Sort of a
connect by query?
I've done a small amount of work with the xmltable/xmlquery
packages, but they seem to assume you are bringing back identical records from
your query, and I'll be bring back every kind of tag there is in the document.
I'm basically trying to split the xhtml document into
several documents, every so many "line-feed" tags, such as
</tr>, </p>, <hr />, etc.
If I can loop thru the tags in document order, I can place
each open tag in a lifo stack, and remove it as it closes.
That will give me ( I think! J ) the
context tags I would need to prepend and append to the extracted html fragments.
Any hints on the various commands one would have to issue
for this?
Then again, there may be a better "set" based way
to approach this, but xpath stuff is NOT my strong suit.
Thanks!
|
[1]
|
|
|
about | contact Other archives ( Real Estate discussion Medical topics )
|