473,325 Members | 2,872 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,325 software developers and data experts.

[xerces c++] Add attributes to nodes

Hello,

I'm walking through my XML tree and I want to add attributes to all
its nodes.
I thought to use the following code:

DOMElement* p_tmpNode = (DOMElement*)p_node->getChildNodes()->item(i);
p_tmpNode->setAttribute(XMLString::transcode(attrName),XMLSt ring::transcode(attrVal));

Is there a more elegant way to do the same avoiding the downcast ?

TIA,
Fabien
Jul 20 '05 #1
0 1307

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Rene | last post by:
Hi, Newbie alert... I'm using Xerces-C as a DOM parser. I got it validating, and can retrieve/walk my XML nodes. However, I'm missing some functionality. Given this example XML file: ...
2
by: Cigdem | last post by:
Hello, I am trying to parse the XML files that the user selects(XML files are on anoher OS400 system called "wkdis3"). But i am permenantly getting that error: Directory0: \\wkdis3\ROOT\home...
4
by: MBR | last post by:
Help! Does anybody know a simple example how to use xerces (http://xml.apache.org) with C++ to parse a simple xml file, go from node to node and read the data in the nodes? Thanks, Matthias
6
by: Hans Kamp | last post by:
My program fails reading XML attributes. A fragment of the code is: private void showXmlNodeAtTreeNode(XmlNodeList xnl, TreeNode tn) { int i; for (i = 0; i < xnl.Count; i++) { XmlNode xn =...
2
by: VanOrton | last post by:
Hi all, When XercesDOMParser parses an XML document with a Schema instance, by default it adds all missing default and fixed attributes. I have the impression though that it misses the...
3
by: Nicolas | last post by:
Hi everybody, I'm stuck for a couple of days now to the following issue, concerning fixed/default attributes and multiple namespaces. Any help would be greatly appreciated... I'm using Xerces...
9
by: anupamjain | last post by:
Hi, After 2 weeks of search/hit-and-trial I finally thought to revert to the group to find solution to my problem.(something I should have done much earlier) This is the deal : On a JSP...
1
by: Matthias Braun | last post by:
Hilfe! Ich habe mir eine Xerces C++ Routine geschrieben, die alle Dokumente des XML-Trees parst. Die folgende rekursive Funktion funktioniert allerdings nicht 100%. Wer kann helfen? Danke,...
3
by: mearvk | last post by:
I am unable to get Xerces to write out attributes from a struct which I am able to print out and verify is correct. The structs are defined below as is subsection of the output. int...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.