You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xerces.apache.org by Sheen Brisals <sh...@hp.com> on 2002/04/19 12:10:50 UTC

RE: How to get the value of xs:documentation schema

Thanks Harald.

Going through the list of children, I can get the text.

Regards,
Sheen

-----Original Message-----
From: Harald.Lemmin@softwareag.com [mailto:Harald.Lemmin@softwareag.com]
Sent: Friday, April 19, 2002 9:57 AM
To: xerces-j-user@xml.apache.org
Subject: RE: How to get the value of xs:documentation schema


The content of the documentation node is stored as node value in a text 
node
child. The debugger does not tell you the truth if you use the Xerces 
in the
(default) deferred mode. Only if you retrieve the children, the debugger
will show the link.

regards,
Harald

-----Original Message-----
From: sheen_brisals@hp.com [mailto:sheen_brisals@hp.com]
Sent: Freitag, 19. April 2002 10:49
To: xerces-j-user@xml.apache.org
Subject: How to get the value of xs:documentation schema 


Hi all,

I've been using Xerces 1.4 and parsing and manipulating DOM without 
much trouble. I am bit lost when I tried to get value ("Comment 
describing your top element" as in the following schema) out of a 
<documentation> schema element. While examining the DOM Node interface 
for the xsd:documentation node using the debugger I found NamedNodeMap 
and ChildNode are null. Node.getNodeValue() also returns null. 
Following is a sample schema I'm trying to deal with. 

Any help will be very useful. 

Regards,
Sheen

<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2000/10/XMLSchema" 
elementFormDefault="qualified">
    <xsd:element name="TopElement">
        <xsd:annotation>
                <xsd:documentation>Comment describing your top 
element</xsd:documentation>
        </xsd:annotation>
        <xsd:complexType>
            <xsd:sequence>
                <xsd:element name="Child1" type="xsd:string" />
                <xsd:element name="Child2" type="xsd:string" />
            </xsd:sequence>
        </xsd:complexType>
    </xsd:element>
</xsd:schema>


---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org