Return-Path: Delivered-To: apmail-ws-axis-dev-archive@www.apache.org Received: (qmail 25007 invoked from network); 3 Aug 2007 12:03:26 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 3 Aug 2007 12:03:26 -0000 Received: (qmail 36195 invoked by uid 500); 3 Aug 2007 12:03:23 -0000 Delivered-To: apmail-ws-axis-dev-archive@ws.apache.org Received: (qmail 36129 invoked by uid 500); 3 Aug 2007 12:03:23 -0000 Mailing-List: contact axis-dev-help@ws.apache.org; run by ezmlm Precedence: bulk Reply-To: axis-dev@ws.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list axis-dev@ws.apache.org Received: (qmail 36118 invoked by uid 99); 3 Aug 2007 12:03:23 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 03 Aug 2007 05:03:23 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 03 Aug 2007 12:03:13 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id D6E747141ED for ; Fri, 3 Aug 2007 05:02:52 -0700 (PDT) Message-ID: <16329299.1186142572861.JavaMail.jira@brutus> Date: Fri, 3 Aug 2007 05:02:52 -0700 (PDT) From: "sumedha rubasinghe (JIRA)" To: axis-dev@ws.apache.org Subject: [jira] Commented: (AXIS2-3050) Reading indented XML using SAAJ (which uses AXIOM) treats line breaks and spaces as text nodes In-Reply-To: <3720595.1185989992811.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/AXIS2-3050?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12517507 ] sumedha rubasinghe commented on AXIS2-3050: ------------------------------------------- sorry.. The indents are not being shown properly in the above post. But I tried with them. Could you please try the above code & get back? Thanks. /sumedha > Reading indented XML using SAAJ (which uses AXIOM) treats line breaks and spaces as text nodes > ---------------------------------------------------------------------------------------------- > > Key: AXIS2-3050 > URL: https://issues.apache.org/jira/browse/AXIS2-3050 > Project: Axis 2.0 (Axis2) > Issue Type: Bug > Components: om > Affects Versions: 1.3 > Environment: All > Reporter: Jeff Faath > Assignee: sumedha rubasinghe > Priority: Minor > > I am trying to read this XML snippet: > > > > > > > Using this code to read in and process: > String s = > MessageFactory msgFactory = MessageFactory.newInstance(); > SOAPMessage soapReq = msgFactory.createMessage(null,new ByteArrayInputStream(s.getBytes())); > SOAPBody soapReqBody = soapReq.getSOAPBody(); > Then, on this line: > Node n = soapReqBody.getFirstChild(); > The node returned on this call is a Text node with a value of "\n " (line break with spaces). In other words, the code handles the indenting up until the SOAPBody element is isolated. Then calling the getFirstChild() method returns the indenting as a Text node. Stepping into the code reveals that the getFirstChild() method comes from SAAJ's SOAPElementImpl. This in turn calls getFirstChild() from it's element member variable which is of type SOAP11BodyImpl from AXIOM. It is this call that is returning the indentation. > Not sure if this is a bug or if AXIOM doesn't allow indented XML. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. --------------------------------------------------------------------- To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org For additional commands, e-mail: axis-dev-help@ws.apache.org