Return-Path: Delivered-To: apmail-xerces-c-users-archive@www.apache.org Received: (qmail 46842 invoked from network); 7 Jul 2009 04:32:16 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 7 Jul 2009 04:32:16 -0000 Received: (qmail 60815 invoked by uid 500); 7 Jul 2009 04:32:26 -0000 Delivered-To: apmail-xerces-c-users-archive@xerces.apache.org Received: (qmail 60699 invoked by uid 500); 7 Jul 2009 04:32:25 -0000 Mailing-List: contact c-users-help@xerces.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: c-users@xerces.apache.org Delivered-To: mailing list c-users@xerces.apache.org Received: (qmail 60683 invoked by uid 99); 7 Jul 2009 04:32:25 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 07 Jul 2009 04:32:25 +0000 X-ASF-Spam-Status: No, hits=-1.8 required=10.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_MED,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of sreenivasulu.gelle@sap.com designates 155.56.68.140 as permitted sender) Received: from [155.56.68.140] (HELO smtpde03.sap-ag.de) (155.56.68.140) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 07 Jul 2009 04:32:17 +0000 Received: from mail.sap.corp by smtpde03.sap-ag.de (26) with ESMTP id n674Vu1o003496 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 7 Jul 2009 06:31:56 +0200 (MEST) X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C9FEBB.CB108016" Subject: Replacement for 2.7.0 depecated API getRootElemId in 3.0.1 Date: Tue, 7 Jul 2009 00:31:28 -0400 Message-ID: <4F420EF3A0BD8449B9FAD97C11E9AEAB01764F4A@usphle17.phl.sap.corp> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Replacement for 2.7.0 depecated API getRootElemId in 3.0.1 Thread-Index: Acn+u8uhvjIFsJVeRY+eg+JYOtlJGg== From: "Gelle, Sreenivasulu" To: , Cc: "Ho, XuanLoan" , "Zhou, Xiaofan" X-OriginalArrivalTime: 07 Jul 2009 04:31:53.0233 (UTC) FILETIME=[DA585010:01C9FEBB] X-Scanner: Virus Scanner virwal03 X-SAP: out X-Virus-Checked: Checked by ClamAV on apache.org ------_=_NextPart_001_01C9FEBB.CB108016 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable HI All, =20 I am upgrading Xerces from 2.7.0 to 3.0.1. I am having a problem when I am trying to get the root element for a given DTD. Your inputs are appreciated to fix this upgrade issue. =20 =20 When using 2.7.0, I have the following piece of code to get the root node of the DTD: =20 DTDValidator& x =3D (DTDValidator&)m_parser->getValidator(); =20 DTDGrammar* grammar = =3D (DTDGrammar*) x.getGrammar(); U4 root_id =3D grammar->getRootElemId(); NameIdPoolEnumerator elemEnum = =3D grammar->getElemEnumerator(); while(elemEnum.hasMoreElements()) { const DTDElementDecl& curElem =3D elemEnum.nextElement(); if(root_id =3D=3D curElem.getId()) { //Getting the root element name. rootName =3D (UChar*)curElem.getFullName(); break; } } =20 In the above code, m_parser is an instance of SAXParser, and it parse an XML with a DTD associated with it using . =20 Now in 3.0.1, I noticed that the interface getRootElemId() does not exist in DTDGrammar class anymore.=20 What is the alternative way to get the root element? Can anyone point me to the new interface? =20 Thanks -Srini =20 =20 =20 =20 ------_=_NextPart_001_01C9FEBB.CB108016--