473,785 Members | 2,449 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Resolving character references with C++ Arabica-MSXML

I have an element that looks like this:

<PhoneNumber>&l t;NUMBER&gt;</PhoneNumber>

I would like to have the content returned as "<NUMBER>".

Not only don't I get the character references resolved, but also what is
only one Text-node child of the element-node becomes several nodes (When I
have character references)

When googeling I see posts describing the opposite problem... Is it a
question about parser-options.

On the DOM-side, this is C++ with Arabica wrapping MSXML, it doesn't seem to
have the "GetData", of the Java oriented DOM, Xerces seems to have something
like GetTextValue which I don't seem to have. ...IS it just a feature
missing in Arabica, or should I do it some other way?

Can I solve it by diving down to MSXML?

Thanks

Olav

Thanks

Olav
Jul 20 '05 #1
1 1392


Olav wrote:
I have an element that looks like this:

<PhoneNumber>&l t;NUMBER&gt;</PhoneNumber>

I would like to have the content returned as "<NUMBER>".

Not only don't I get the character references resolved, but also what is
only one Text-node child of the element-node becomes several nodes (When I
have character references)

When googeling I see posts describing the opposite problem... Is it a
question about parser-options.

On the DOM-side, this is C++ with Arabica wrapping MSXML, it doesn't seem to
have the "GetData", of the Java oriented DOM, Xerces seems to have something
like GetTextValue which I don't seem to have. ...IS it just a feature
missing in Arabica, or should I do it some other way?

Can I solve it by diving down to MSXML?


MSXML has a property named text for element nodes that should give you
the text you are looking for.

--

Martin Honnen
http://JavaScript.FAQTs.com/

Jul 20 '05 #2

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

Similar topics

5
2621
by: Dean A. Hoover | last post by:
I am writing a parser for xml that will not have an associated DTD. I want to be able to handle certain character references (e.g., &copy;) in the program. When I run the following against a chunk of xml containing &copy;, I get the following: org.xml.sax.SAXParseException: Reference to undefined entity "&copy;". at org.apache.crimson.parser.Parser2.fatal(Parser2.java:3182)
3
6028
by: Olav | last post by:
I need to do some cross-platform XML in C++. Previously I have used Xerces, but some Googeling indicated that many people prefer libxml. Also it is UTF-8, which is easier for us (Xerces is UTF-16) . So I decided to use libxml++ for my prototype. On Windows it took much longer to set up than Xerces, had to find some obscure DLLs before it would run, Got a GPF at a point, and did the rest of the prototype in Xerces.
0
1368
by: Olav | last post by:
Resolving character references with C++/Arabica I have an element that looks like this: <PhoneNumber>&lt;NUMBER&gt;</PhoneNumber> I would like to have the content returned as "<NUMBER>". Not only don't I get the character references resolved, but also what is only one Text-node child of the element-node becomes several nodes
0
1110
by: Jan van Mansum | last post by:
Hello group, I have the following problem. I am trying to write an XSLT source code formatter as an exercise. My problem is that the parser (Xalan in my case) expands the character references (such as &#xA; for a newline). However, I would my source code formatter to keep the character reference unchanged. I know how to solve this problem for entity references, but I don't know if there is a way to get hold of the character references...
1
2191
by: Headless | last post by:
Are character references allowed in generated content, in other words should they be parsed by a UA? (Opera does, Moz doesn't) Headless
27
2515
by: Ken Human | last post by:
I want to generate every possible 16 character combination of the characters 0-9, A-Z, and a-z programatically. My current code follows: #include <stdio.h> #include <ctype.h> int main() { char strBuf = {0}; int i, j;
1
1035
by: Steve W | last post by:
I hope this makes sense ! We have an VB ASP.NET Web Application. In the bin directory are all our compiled dlls. We have written some integration with a 3rd party, which some of our clients use and some that don't. Those that don't won't have a particular dll in the bin directory of the web site. However, removing this dll causes a problem because .Net seems to want to
0
1303
by: PJ6 | last post by:
DotNet has always had quirky problems with debugging DLL's when running inside of other projects - sometimes, mysteriously, you get unhittable breakpoints (question marks), or break points that get a "plus" sign next to them and gain "children". Sometimes it's your own fault and the cause is obvious, but on occasion these things happen for no apparent reason... now I've uncovered an unexpected cause. Reference comparisons are...
7
4921
by: Trac Bannon | last post by:
When I load XML from a file into a dotNet XMLDataDocument, the UTF-8 codes are resolved but the 5 special XML entities are not. How can I force those 5 special character types to be translated?
3
1843
by: John Kotuby | last post by:
I have just upgraded to a new development machine that came with Vista ultimate. I am developing a website with VS2005 and VB. My image and css references in my source code are all relative. For example http://root.com/images/some.gif in my source is just /images/some.gif. When I publish to the root web on any IIS server, that works just fine. On my old XP machine I had registered a custom version of multisite.dll with a config.ini like...
0
9645
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9480
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10325
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10091
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9950
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7499
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6739
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
4050
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2879
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.