Please take our Survey
logo       

Choosing A Webhost:
A web hosting service is a type of Internet hosting service that allows individuals and organizations to provide their own website accessible via the World Wide Web. Web hosts are companies that provide space on a server they own for use by their clients as well as providing Internet connectivity, typically in a data center. Web hosts can also provide data center space and connectivity to the Internet for servers they do not own to be located in their data center, called colocation. more...

RE: Xalan C / XPath question: msg#00009

text.xml.xalan.c++.user

Subject: RE: Xalan C / XPath question

That is actually one of the critical pieces of this. I am going to have
a base XML document that will need to have information added based on
certain initial conditions. Sorry for the code confusion - grabbed the
wrong file handle.
The real code should be in this message.

Jonathan


-----Original Message-----
From: David Bertoni [mailto:dbertoni@xxxxxxxxxx]
Sent: Friday, March 02, 2007 3:12 PM
To: xalan-c-users@xxxxxxxxxxxxxx
Subject: Re: Xalan C / XPath question

Coker, Jonathan M wrote:
> Thanks to everyone who has replied. I worked with the SimpleXPathAPI
> example and determined that my fudamental problem was not wrapping my
> input with single quotes. Once I did that, the sample started doing
> what I expected. Now here is what I would really like to do: My XML
> file has many more entries in each section and some entries could be
> several (4+) levels deep. Once I parse the document, I want to be
> able to do things like get all the player nodes that have swords with
> an active value of '1'. Or, I may simply want to get the name of a
> player with a given ID. I am using code from 'C++ Cookbook' as my
> starting point. See Attached. The main difference I see is that I am

> creating my document using the XercesDOMParser. If I need to rethink
> my approach, please let me know.
>

The code you attached is a trivial program that converts a tab character
to
3 spaces, so I can't comment on your code.

However, unless you have some need for a DOM instance that you can
modify, I would suggest you stick with using Xalan-C's standard source
tree.

If you find you are doing lots of searches for attribute values, you
might want to consider writing a DTD that declares those attributes as
type ID, so you can use the XPath id() function to find nodes more
efficiently.

Dave

Attachment: 14-23.cpp
Description: 14-23.cpp

<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
user-groups.jax...    php.zend.framew...    os.solaris.open...    web.quixote.use...    java.openjdk.ho...    ietf.secmech/20...    gnu.glpk/2004-0...    recreation.cars...    network.smokepi...    linux.drivers.i...    cms.opencms.dev...    fonts.gfontview...    text.xml.soap.u...    voip.nist-sip/2...    debian.ports.hp...    xfree86.interna...    science.biology...    qnx.openqnx.dev...    mail.sylpheed.c...    busybox/bios/20...    emulators.kvm.s...    hardware.openco...    apple.fink.begi...    kde.german/2006...   
Home | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe

Navigation