List Info

Thread: RE: walking the xml document tree




RE: walking the xml document tree
user name
2008-09-29 12:15:28
David, maybe I'm completely out to lunch here (and I _know_ I'm missing a LOT of clues with respect to xml) ... but still ...
 
WHY do you want / need to do all this string parsing? WHY NOT just make sure the originals are in PDF format? (and if the originals paginate, leave them be?)
 
If you offer such a doc via the web, it's searchable, embed-able, and you can go first / last paging fairly easily ... if you want to get clever, you can also, at your server level, run some sort of something that extracts just the first and last page into a NEW PDF, and send just the two-pager down the pipe. There ARE cheap utilities out there that do this (with server (or company)-based licensing) ... Adobe's tools for doing this are (to my tastes), way pricey.
 
Just because you know PL/SQL, doesn't mean that's where the answer is ..
 
(and HI!)

Suzanne ( 2Bwy A13.32)
desk: 646-252-8663, cell: 347-907-1125

 


From: ml-errorsfatcity.com [mailto:ml-errorsfatcity.com] On Behalf Of David Wendelken
Sent: Saturday, September 27, 2008 9:31 AM
To: Multiple recipients of list ODTUG-SQLPLUS-L
Subject: walking the xml document tree

 

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&gt;, </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 )