sign in | join about | help | sitemap
Connecting Tech Pros Worldwide
kzawah@gmail.com's Avatar

Beginners question with xerces DOM


Question posted by: kzawah@gmail.com (Guest) on October 19th, 2005 10:35 AM
Hi, I am trying to quickly use xerces to parse some simple config
files. I have used SAX a bit before but this is my first day working
with DOM.

Ive looked at the docs, and downloaded some samples from the web, the
web sample is creating an XML writer dom implementation with:
pImplement =
DOMImplementationRegistry::getDOMImplementation(Xe rcesString("LS"));
The xerces docs for the function say:
DOMImplementationRegistry::getDOMImplementation(co nst XMLCh * features
)
where features might be something like "XML 1.0 Traversal 2.0"

Whats "features" do I specify for a reader? Actually thats not my
question. A far better question would be where in the docs is the list
of the available or provided DOM implementations and the features we
need to specify to get them.

Thanks a lot
Kurt

2 Answers Posted
Martin Honnen's Avatar
Guest - n/a Posts
#2: Re: Beginners question with xerces DOM


Join Bytes! wrote:
[color=blue]
> Whats "features" do I specify for a reader? Actually thats not my
> question. A far better question would be where in the docs is the list
> of the available or provided DOM implementations and the features we
> need to specify to get them.[/color]

Xerces tries to implement the W3C DOM so feature strings can be found in
the W3C DOM specifications, for instance here
<http://www.w3.org/TR/DOM-Level-3-Core/core.html#DOMFeatures>
<http://www.w3.org/TR/DOM-Level-3-LS/load-save.html#LS-DOMImplementation>
There are three different levels of the W3C DOM and there are various
modules. Finding a complete list of features strings often requires to
check all those specifications for the different modules. However nearly
all Level 2 features are listed here
<http://www.w3.org/TR/DOM-Level-2-Core/introduction.html#ID-Conformance>

Are you aware that there is a Xerces-C user mailing list here
<http://marc.theaimsgroup.com/?l=xerces-c-users>
? There you might find more expertise on using Xerces-C.


--

Martin Honnen
http://JavaScript.FAQTs.com/
Kza's Avatar
Guest - n/a Posts
#3: Re: Beginners question with xerces DOM

Thanks a lot, got everything working now. Next step might be helping
xerces out with their docs :P Some examples and header files would be
nice, and mentioning "XML 1.0 Traversal 2.0" as a possible feature
rather than "LS" which is what 90% of the people coming in looking for
a quick answer are looking for. Gives me the feeling theres a religous
reason behind it though, as if its important to draw a line between
xerces and the w3c...

I think XML in general is still in the early days, like needing to be a
mechanic in order to drive a car, in the sense that one needs to know
more of the technical specs to USE a parser than hack one up from
scratch.

Still I look forward to more user friendly xml tools in the near future
:)

Thanks again.

 
Not the answer you were looking for? Post your question . . .
196,795 members ready to help you find a solution.
Join Bytes.com

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 196,795 network members.
Post your question now . . .
It's fast and it's free

Popular Articles

Top Community Contributors