Note that without the generated code or jar file you will not be able to
access the values. You can parse the tree though.

________________________________

From: Andrew Mansfield [mailto:[EMAIL PROTECTED] 
Sent: 15 September 2008 14:59
To: user@xmlbeans.apache.org
Subject: RE: Very simple question (I think)


I just ran the following Junit test with no problems...
 
public void test() throws XmlException, IOException{

String xmltext = new
String("<test><element1>testvalue</element1></test>");

XmlObject xmlObject = XmlObject.Factory.parse(new
ByteArrayInputStream(xmltext.getBytes()));

Node rootnode = xmlObject.getDomNode().getFirstChild();

assertEquals("test",rootnode.getNodeName());

}

 


________________________________

From: Nicolai Odum [mailto:[EMAIL PROTECTED] 
Sent: 15 September 2008 14:41
To: user@xmlbeans.apache.org
Subject: RE: Very simple question (I think)



Sorry bad example 

It's was just  suppose to be psudo code 

String xml = "big xml document"; 

I have tried it with many big valid xml documents - without luck. 

/Nicolai 




"Andrew Mansfield" <[EMAIL PROTECTED]> 

15-09-2008 15:36 
Please respond to
user@xmlbeans.apache.org


To
<user@xmlbeans.apache.org> 
cc
Subject
RE: Very simple question (I think)      

                




I think you need to parse a valid source document first. Then you can
get access to the underlying XmlObject. 
  
Regards, 


________________________________

From: Nicolai Odum [mailto:[EMAIL PROTECTED] 
Sent: 15 September 2008 14:32
To: user@xmlbeans.apache.org
Subject: Very simple question (I think)


Hello 

On xmlbeans.apache.org
<http://xmlbeans.apache.org/docs/2.0.0/guide/conGettingStartedwithXMLBea
ns.html>  it says that XMLBeans provide 
 
<quote> 
It provides a familiar Java object-based view of XML data without losing
access to the original, native XML structure 
</quote> 

I am using XMLBeans on a xml structure that is signed with a hash value
so *nothing* must change before the xml is invalid. 

The question is: *HOW* do i get access to the original, native XML
structure. 

because this doesn't work 

String xml = "big xml document"; 
XmlObject parse = XmlObject.Factory.parse(xml); 
String newXml = parse.xmlText(); 

if (xml.equals(newXml) 
       System.out.println("jubii"); 
else 
       System.out.println("damn"); 



Please help :-) 

Cheers 

Nicolai 
  
________________________________


This email with all information contained herein or attached hereto may
contain confidential and/or privileged information intended for the
addressee(s) only. If you have received this email in error, please
contact the sender and immediately delete this email in its entirety and
any attachments thereto. 
(W1) 



  
________________________________

This email with all information contained herein or attached hereto may
contain confidential and/or privileged information intended for the
addressee(s) only. If you have received this email in error, please
contact the sender and immediately delete this email in its entirety and
any attachments thereto.
(W1)


 

 
--------------------------------------------------------------------------
This email with all information contained herein or attached hereto may contain 
confidential and/or privileged information intended for the addressee(s) only. 
If you have received this email in error, please contact the sender and 
immediately delete this email in its entirety and any attachments thereto.
(W1)

 

Reply via email to