|
|
Choosing A Webhost: |
RE: Xalan C / XPath question: msg#00009text.xml.xalan.c++.user
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
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: Xalan C / XPath question, David Bertoni |
|---|---|
| Next by Date: | Re: Re: Re: XSLT question, Indrajit Bhattacharya |
| Previous by Thread: | Re: Xalan C / XPath question, David Bertoni |
| Next by Thread: | Re: Xalan C / XPath question, David Bertoni |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
Free MagazinesCisco NewsReceive 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 |