XML file
---------------
<rdcData version="1.0" target="Search" >
<entity type="O" subtype="NC" id="86">
<header>
<PI>128818</PI>
</header>
<content>
<property id="178396">
<currValue>oy~~ `g</currValue>
<validFrom>1000 0101</validFrom>
</property>
<property id="178392">
<currValue>oy~~ `g</currValue>
<validFrom>1000 0101</validFrom>
</property>
<property id="178402">
<currValue>~y *</currValue>
<validFrom>1999 0212</validFrom>
</property>
<property id="178408">
<currValue>1338 62</currValue>
<validFrom>1000 0101</validFrom>
</property>
<property id="178507">
<currValue>No t categorised</currValue>
</property>
</content>
</entity>
</rdcData>
Microsoft Visual Studio .NET C++ program
(Managed C++ application)
-------------------------------------
#define _UNICODE
#include "stdafx.h"
#include <ctime>
#include <iostream>
using std::cerr;
using std::cout;
using std::endl;
using std::ios;
#include <fstream>
using std::ifstream;
using std::ofstream;
#include <tchar.h>
#include <stdio.h>
#include <stdlib.h>
#using <mscorlib.dll >
#using <System.xml.dll >
using namespace System;
using namespace System::Xml;
void _tmain(int argc, _TCHAR* argv[])
{
if (argc != 2)
{
printf("Usage: xml_reader <filename>\n" );
exit(0);
}
XmlTextReader* reader = new XmlTextReader(a rgv[1]);
try
{
while(reader->Read())
{
switch(reader->NodeType)
{
case XmlNodeType::El ement:
printf("element = %s %s\n",reader->Name,reader->Value);
while (reader->MoveToNextAttr ibute()) // Read the attributes.
{
printf(" Next %s %s\n", reader->Name, reader->Value);
}
break;
case XmlNodeType::Te xt:
printf("text = %s\n",reader->Value);
break;
default:
break;
}
}
}
catch(Exception *pe)
{
printf("%s\n",p e->ToString());
}
}
----------------------
I believe this is the offending line:
<currValue>oy~~ `g</currValue>
*** Sent via Developersdex
http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!