You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by Bala Ayres <ba...@XSeLlence.com> on 2000/07/19 22:23:04 UTC

newbie DTD question

How do i get a handle to DTD without having to parse a XML document.
The samples - particularly enumVal shows how to do this using the
getElemEnumerator and then iterating while it hasMoreElement()
but it requires a DTD Document Type to be declared at the top of a XML
data file..

The need for me is to read only the DTD and walk thru it.

Is this possible ?

Thanks

BAyres
XSELLENCE INC


Re: newbie DTD question

Posted by Arundhati Bhowmick <ar...@hyperreal.org>.
You need to set your library path variable (LD_LIBRARY_PATH or LIBPATH, the onbe
necessary for your system) to the directory where your xerces library resides
appending to the system library directories.
Look at the documentation that guides you how to set it up.
Arundhati

Bala Ayres wrote:

> thanks and another question...
> I have modified memparse to include my DTD and a sample data.
> I am using the  Makefile.in in memparse dir to compile and link the
> code....results in a bunch of unreferenced symbols - most of which are C++
> related symbols (e.g. cout)
> I have LIBRARY_SEARCH_PATHS pointing to
> /usr/lib/gcc-lib/i586-mandrake-linux/egcs-2.91.6
>
> and LIBRARY_NAMES pointing to libstdc++.so
>
> Appreciate any info.
>
> THanks
>
> Bayres
> XSELLENCE INc
>
> Dean Roddey wrote:
>
> > You would need to create a dummy file, in memory on the fly probably, which
> > references the DTD. Then just parse that file. See the MemParse sample for
> > how to parse from memory, and just generate the file on the fly instead, and
> > reference the DTD you want. Since you don't know the elements ahead of time,
> > just use a dummy root element and ignore the error that the element
> > referenced in the DOCTYPE and the root element are not declared.
> >
> > --------------------------
> > Dean Roddey
> > The CIDLib C++ Frameworks
> > Charmed Quark Software
> > droddey@charmedquark.com
> > http://www.charmedquark.com
> >
> > "You young, and you gotcha health. Whatchoo wanna job fer?"
> >
> > ----- Original Message -----
> > From: "Bala Ayres" <ba...@XSeLlence.com>
> > To: <xe...@xml.apache.org>
> > Sent: Wednesday, July 19, 2000 1:23 PM
> > Subject: newbie DTD question
> >
> > > How do i get a handle to DTD without having to parse a XML document.
> > > The samples - particularly enumVal shows how to do this using the
> > > getElemEnumerator and then iterating while it hasMoreElement()
> > > but it requires a DTD Document Type to be declared at the top of a XML
> > > data file..
> > >
> > > The need for me is to read only the DTD and walk thru it.
> > >
> > > Is this possible ?
> > >
> > > Thanks
> > >
> > > BAyres
> > > XSELLENCE INC
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
> > > For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
> > For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-c-dev-help@xml.apache.org


Re: newbie DTD question

Posted by Bala Ayres <ba...@XSeLlence.com>.
thanks and another question...
I have modified memparse to include my DTD and a sample data.
I am using the  Makefile.in in memparse dir to compile and link the
code....results in a bunch of unreferenced symbols - most of which are C++
related symbols (e.g. cout)
I have LIBRARY_SEARCH_PATHS pointing to
/usr/lib/gcc-lib/i586-mandrake-linux/egcs-2.91.6

and LIBRARY_NAMES pointing to libstdc++.so

Appreciate any info.

THanks

Bayres
XSELLENCE INc

Dean Roddey wrote:

> You would need to create a dummy file, in memory on the fly probably, which
> references the DTD. Then just parse that file. See the MemParse sample for
> how to parse from memory, and just generate the file on the fly instead, and
> reference the DTD you want. Since you don't know the elements ahead of time,
> just use a dummy root element and ignore the error that the element
> referenced in the DOCTYPE and the root element are not declared.
>
> --------------------------
> Dean Roddey
> The CIDLib C++ Frameworks
> Charmed Quark Software
> droddey@charmedquark.com
> http://www.charmedquark.com
>
> "You young, and you gotcha health. Whatchoo wanna job fer?"
>
> ----- Original Message -----
> From: "Bala Ayres" <ba...@XSeLlence.com>
> To: <xe...@xml.apache.org>
> Sent: Wednesday, July 19, 2000 1:23 PM
> Subject: newbie DTD question
>
> > How do i get a handle to DTD without having to parse a XML document.
> > The samples - particularly enumVal shows how to do this using the
> > getElemEnumerator and then iterating while it hasMoreElement()
> > but it requires a DTD Document Type to be declared at the top of a XML
> > data file..
> >
> > The need for me is to read only the DTD and walk thru it.
> >
> > Is this possible ?
> >
> > Thanks
> >
> > BAyres
> > XSELLENCE INC
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
> > For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-c-dev-help@xml.apache.org


Re: newbie DTD question

Posted by Dean Roddey <dr...@charmedquark.com>.
You would need to create a dummy file, in memory on the fly probably, which
references the DTD. Then just parse that file. See the MemParse sample for
how to parse from memory, and just generate the file on the fly instead, and
reference the DTD you want. Since you don't know the elements ahead of time,
just use a dummy root element and ignore the error that the element
referenced in the DOCTYPE and the root element are not declared.

--------------------------
Dean Roddey
The CIDLib C++ Frameworks
Charmed Quark Software
droddey@charmedquark.com
http://www.charmedquark.com

"You young, and you gotcha health. Whatchoo wanna job fer?"


----- Original Message -----
From: "Bala Ayres" <ba...@XSeLlence.com>
To: <xe...@xml.apache.org>
Sent: Wednesday, July 19, 2000 1:23 PM
Subject: newbie DTD question


> How do i get a handle to DTD without having to parse a XML document.
> The samples - particularly enumVal shows how to do this using the
> getElemEnumerator and then iterating while it hasMoreElement()
> but it requires a DTD Document Type to be declared at the top of a XML
> data file..
>
> The need for me is to read only the DTD and walk thru it.
>
> Is this possible ?
>
> Thanks
>
> BAyres
> XSELLENCE INC
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
>