avalon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Donald <pe...@apache.org>
Subject Re: XPath and XML Generation
Date Wed, 02 Oct 2002 01:46:50 GMT
Looks like a neat idea ;)

On Wed, 2 Oct 2002 01:07, Shekhar Jha wrote:
> I was looking at the concept of using XPath to generate skeleton DOM
> object. This means that instead of doing something like (please consider
> the code below more conceptual that actual api call)
> ...
> document.appendChild( OrderElement )
> document.getChild(..).appendChild( CustomerElement )
> document.getChild(..).getChild(..).appendChild( NameElement )
> document.getChild(..).getChild(..).getChild(...).appendChild(NameValueText)
> ...
> the whole tree would be created by just one call
> ...
> node = XPathAPI.selectNode("/Order/Customer[1]/Name");
> node.appendChild(NameValueText)
> ....
> or simply as some body else pointed out on xalan-j-users group just
> ....
> documentcreator.generate(node, "/Order/Customer[1]/Name/text()='John
> Doe'"); ....
>
> I am right now trying to evaluate whether this concept is a valid concept
> and if yes, i have a feeling will reduce Line of Code of XML generation for
> a lot of people.
> I did get some encoraging response on xalan-j-user group, but was also
> looking for some pointer along the line of how to go about it. I am looking
> on this group more interms of validating and detailing this concept.
>
> Shekhar Jha

-- 
Cheers,

Peter Donald
-----------------------------------------------------
When a stupid man is doing something he's ashamed of, 
he always declares that it is his duty.
					George Bernard Shaw 
-----------------------------------------------------


--
To unsubscribe, e-mail:   <mailto:avalon-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:avalon-dev-help@jakarta.apache.org>


Mime
View raw message