Hi,

Thanks for the response.  I have the full distribution and have tried looking at the 
sample apps but couldn't find what I needed. Do you have a suggestion for where to 
look in particular for an answer to question #2?

TIA,

--Hieu


--------- Original Message ---------

DATE: Tue, 16 Sep 2003 17:01:31
From: "Erik Rydgren" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Cc: 

>1) You will have to write your own EntityResolver that maps external
>references to inputs. Then connect your entity resolver to the parser
>before calling the Parse method. Look in the examples for code.
>
>2) There are no getOuterXML method in xerces. You'll have to create a
>DOMWriter and serialize the node yourself. Look in the examples for
>code.
>
>Best regards
>Erik Rydgren
>Mandarin FS
>Sweden
>
>> -----Original Message-----
>> From: Hieu Bui [mailto:[EMAIL PROTECTED]
>> Sent: den 16 september 2003 16:52
>> To: [EMAIL PROTECTED]
>> Subject: xerces 1.6.0 questions
>> 
>> Hi,
>> 
>> I am relatively inexperienced in working with Xerces and I am having a
>> little trouble getting across the finish line with my current problem.
>I
>> am developing with the Xerces 1.6.0 distribution and my XML has the
>> following structure:
>> 
>> <?xml version="1.0" encoding="UTF-8"?>
>> <!DOCTYPE Catalog SYSTEM "http://mydomain.com/items.dtd";>
>> <ItemList>
>>   <Item ID="id1">
>>     <Itemfield Name="name1" Value="val1" />
>>     <Itemfield Name="name2" Value="val2" />
>>     <Itemfield Name="name3" Value="val3" />
>>   </Item>
>>   <Item ID="id2">
>>     <Itemfield Name="name1" Value="val1" />
>>     <Itemfield Name="name2" Value="val2" />
>>     <Itemfield Name="name3" Value="val3" />
>>   </Item>
>> </ItemList>
>> 
>> 
>> I have a two part question:
>> 
>> 1) The DOMParser::parser->parse() method is failing since it does not
>have
>> access to the DTD file (note DTD is not local and I cannot retrieve it
>via
>> http on the fly). Assuming I can't change the XML structure, can I
>tell
>> the parser to ignore the DTD so I can continue to process the XML?
>> 
>> 2) I remove the DTD line from the XML and I can parse it. I use
>> getElementsByTagName("Item") to get a list of DOM_Nodes for each Item
>tag.
>> I want to look for a particular Item ID and return the entire string
>> (representing that node/tag) if the ID matches what I am looking for.
>> However, I can't seem to find a method/property in the DOM_Node class
>to
>> do this. To clarify, if I am looking for Item ID="id1", I want to
>return
>> this string:
>> 
>>   <Item ID="id1">
>>     <Itemfield Name="name1" Value="val1" />
>>     <Itemfield Name="name2" Value="val2" />
>>     <Itemfield Name="name3" Value="val3" />
>>   </Item>
>> 
>> 
>> I know this is an easy question but I just can't seem to get it
>working
>> correctly. Any help would be greatly appreciated...
>> 
>> TIA,
>> 
>> --Hieu
>> 
>> 
>> Need a new email address that people can remember
>> Check out the new EudoraMail at
>> http://www.eudoramail.com
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>
>



Need a new email address that people can remember
Check out the new EudoraMail at
http://www.eudoramail.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to