You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xerces.apache.org by Abbhishek Misra <ab...@gmail.com> on 2008/03/18 11:10:33 UTC

xerces-j2 samples : What should one conclude from the o/p of these

Hello,

I'm trying to explore Xerces-j2 and have started with the samples.

I'm able to execute them but not able to derive scence from most of them !!

   1. java dom.Counter data/personal-schema.xml
      I could understand this : shows count of tags attributes

   2. java dom.GetElementsByTagName -e email data/personal-schema.xml
        it just printed <email> ...

  3.java dom.Writer data/personal-schema.xml
      this printed the existing doc with closing tags appended

 4. java dom.DOM3 data/personal-schema.xml
       this just dumped the doc

for all these I see the return code as 0 (ie echo $? gives 0)

and there are a couple of other examples which do not seem to do any thing

What is one supposed to conclude from these examples ?
Is it the right way to run them , am i missing some thing ??

---------------------------------------------------------------------
To unsubscribe, e-mail: j-users-unsubscribe@xerces.apache.org
For additional commands, e-mail: j-users-help@xerces.apache.org


Re: xerces-j2 samples : What should one conclude from the o/p of these

Posted by Mukul Gandhi <ga...@gmail.com>.
In the past, I have run most of the Xerces-J samples, and they run fine.

You need to put xercesSamples.jar and other Xerces JARs (xml-apis.jar
and xercesImpl.jar atleast) in the CLASSPATH, and run the samples as
documented.

On 3/18/08, Abbhishek Misra <ab...@gmail.com> wrote:
> Hello,
>
> I'm trying to explore Xerces-j2 and have started with the samples.
>
> I'm able to execute them but not able to derive scence from most of them !!
>
>   1. java dom.Counter data/personal-schema.xml
>      I could understand this : shows count of tags attributes
>
>   2. java dom.GetElementsByTagName -e email data/personal-schema.xml
>        it just printed <email> ...
>
>  3.java dom.Writer data/personal-schema.xml
>      this printed the existing doc with closing tags appended
>
>  4. java dom.DOM3 data/personal-schema.xml
>       this just dumped the doc
>
> for all these I see the return code as 0 (ie echo $? gives 0)
>
> and there are a couple of other examples which do not seem to do any thing
>
> What is one supposed to conclude from these examples ?
> Is it the right way to run them , am i missing some thing ??


-- 
Regards,
Mukul Gandhi

---------------------------------------------------------------------
To unsubscribe, e-mail: j-users-unsubscribe@xerces.apache.org
For additional commands, e-mail: j-users-help@xerces.apache.org


Re: xerces-j2 samples : What should one conclude from the o/p of these

Posted by Prashant Reddy <pr...@pramati.com>.
I have to say I do not entirely understand your question.

The samples shipped with Xerces demonstrate how JAXP API can be used to
pick Xerces implementation to accomplish tasks like 

 * Creating a DOM
 * Parsing DOM to find a node given its name
 * Using Load & Save to (pretty) print XML 

I am not entirely sure, if the samples also include setting up
EntityResolver and Catlog etc.

It is of course up to developers to decide how they will use Xerces
implementation in their products or solutions.

Hope this helps.
-Prashant

On Tue, 2008-03-18 at 18:52 +0530, Abbhishek Misra wrote:
> Lets consider Sample dom.Writer	 	
> A sample DOM writer. This sample program illustrates how to traverse a
> DOM tree in order to print a document that is parsed.
> 		
> usage	
> java dom.Writer (options) uri ...
> 
> Will it be correct if one believes that these examples are more relevant from
> "writing java code" rather that trying to obeversve functionality
> 
> 
> On Tue, Mar 18, 2008 at 6:07 PM, Prashant Reddy <pr...@pramati.com> wrote:
> > >From your description of the output, it looks like you are not missing
> >  anything.
> >
> >  What kind of examples are you expecting to find ?
> >
> >  -Prashant
> >
> >
> >
> >  On Tue, 2008-03-18 at 15:40 +0530, Abbhishek Misra wrote:
> >  > Hello,
> >  >
> >  > I'm trying to explore Xerces-j2 and have started with the samples.
> >  >
> >  > I'm able to execute them but not able to derive scence from most of them !!
> >  >
> >  >    1. java dom.Counter data/personal-schema.xml
> >  >       I could understand this : shows count of tags attributes
> >  >
> >  >    2. java dom.GetElementsByTagName -e email data/personal-schema.xml
> >  >         it just printed <email> ...
> >  >
> >  >   3.java dom.Writer data/personal-schema.xml
> >  >       this printed the existing doc with closing tags appended
> >  >
> >  >  4. java dom.DOM3 data/personal-schema.xml
> >  >        this just dumped the doc
> >  >
> >  > for all these I see the return code as 0 (ie echo $? gives 0)
> >  >
> >  > and there are a couple of other examples which do not seem to do any thing
> >  >
> >  > What is one supposed to conclude from these examples ?
> >  > Is it the right way to run them , am i missing some thing ??
> >  >
> >
> >
> > > ---------------------------------------------------------------------
> >  > To unsubscribe, e-mail: j-users-unsubscribe@xerces.apache.org
> >  > For additional commands, e-mail: j-users-help@xerces.apache.org
> >
> >
> >  ---------------------------------------------------------------------
> >  To unsubscribe, e-mail: j-users-unsubscribe@xerces.apache.org
> >  For additional commands, e-mail: j-users-help@xerces.apache.org
> >
> >
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: j-users-unsubscribe@xerces.apache.org
> For additional commands, e-mail: j-users-help@xerces.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: j-users-unsubscribe@xerces.apache.org
For additional commands, e-mail: j-users-help@xerces.apache.org


Re: xerces-j2 samples : What should one conclude from the o/p of these

Posted by ke...@us.ibm.com.
The samples illustrate the use of the APIs by performing simple (often
trivial) tasks. Their main purpose is additional documentation. They are
not necessarily intended to do anything actually useful, though they may
contain code worth reusing.

They are not intended to be a full tutorial in the use of these APIs. Most
of that information is available elsewhere (my standard suggestion: the
introductory material on http://www.ibm.com/xml, combined with the
Xerces-specific information on Apache's website).  If you dont' understand
what the samples are doing after reading their source code, I would
strongly recommend looking at some of those tutorials.

______________________________________
"... Three things see no end: A loop with exit code done wrong,
A semaphore untested, And the change that comes along. ..."
  -- "Threes" Rev 1.1 - Duane Elms / Leslie Fish
(http://www.ovff.org/pegasus/songs/threes-rev-11.html)

Re: xerces-j2 samples : What should one conclude from the o/p of these

Posted by Abbhishek Misra <ab...@gmail.com>.
Lets consider Sample dom.Writer	 	
A sample DOM writer. This sample program illustrates how to traverse a
DOM tree in order to print a document that is parsed.
		
usage	
java dom.Writer (options) uri ...

Will it be correct if one believes that these examples are more relevant from
"writing java code" rather that trying to obeversve functionality


On Tue, Mar 18, 2008 at 6:07 PM, Prashant Reddy <pr...@pramati.com> wrote:
> >From your description of the output, it looks like you are not missing
>  anything.
>
>  What kind of examples are you expecting to find ?
>
>  -Prashant
>
>
>
>  On Tue, 2008-03-18 at 15:40 +0530, Abbhishek Misra wrote:
>  > Hello,
>  >
>  > I'm trying to explore Xerces-j2 and have started with the samples.
>  >
>  > I'm able to execute them but not able to derive scence from most of them !!
>  >
>  >    1. java dom.Counter data/personal-schema.xml
>  >       I could understand this : shows count of tags attributes
>  >
>  >    2. java dom.GetElementsByTagName -e email data/personal-schema.xml
>  >         it just printed <email> ...
>  >
>  >   3.java dom.Writer data/personal-schema.xml
>  >       this printed the existing doc with closing tags appended
>  >
>  >  4. java dom.DOM3 data/personal-schema.xml
>  >        this just dumped the doc
>  >
>  > for all these I see the return code as 0 (ie echo $? gives 0)
>  >
>  > and there are a couple of other examples which do not seem to do any thing
>  >
>  > What is one supposed to conclude from these examples ?
>  > Is it the right way to run them , am i missing some thing ??
>  >
>
>
> > ---------------------------------------------------------------------
>  > To unsubscribe, e-mail: j-users-unsubscribe@xerces.apache.org
>  > For additional commands, e-mail: j-users-help@xerces.apache.org
>
>
>  ---------------------------------------------------------------------
>  To unsubscribe, e-mail: j-users-unsubscribe@xerces.apache.org
>  For additional commands, e-mail: j-users-help@xerces.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: j-users-unsubscribe@xerces.apache.org
For additional commands, e-mail: j-users-help@xerces.apache.org


Re: xerces-j2 samples : What should one conclude from the o/p of these

Posted by Prashant Reddy <pr...@pramati.com>.
>>From your description of the output, it looks like you are not missing
anything.

What kind of examples are you expecting to find ?

-Prashant

On Tue, 2008-03-18 at 15:40 +0530, Abbhishek Misra wrote:
> Hello,
> 
> I'm trying to explore Xerces-j2 and have started with the samples.
> 
> I'm able to execute them but not able to derive scence from most of them !!
> 
>    1. java dom.Counter data/personal-schema.xml
>       I could understand this : shows count of tags attributes
> 
>    2. java dom.GetElementsByTagName -e email data/personal-schema.xml
>         it just printed <email> ...
> 
>   3.java dom.Writer data/personal-schema.xml
>       this printed the existing doc with closing tags appended
> 
>  4. java dom.DOM3 data/personal-schema.xml
>        this just dumped the doc
> 
> for all these I see the return code as 0 (ie echo $? gives 0)
> 
> and there are a couple of other examples which do not seem to do any thing
> 
> What is one supposed to conclude from these examples ?
> Is it the right way to run them , am i missing some thing ??
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: j-users-unsubscribe@xerces.apache.org
> For additional commands, e-mail: j-users-help@xerces.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: j-users-unsubscribe@xerces.apache.org
For additional commands, e-mail: j-users-help@xerces.apache.org