Hello
On xmlbeans.apache.org 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
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
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
I just ran the following Junit test with no problems...
public void test() throws XmlException, IOException{
String xmltext = new
String(testelement1testvalue/element1/test);
XmlObject xmlObject = XmlObject.Factory.parse(new
ByteArrayInputStream(xmltext.getBytes()));
Node rootnode =
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
I will try again :-)
Sorry for my pore english skills.
When I say invalid i mean that the generated hash value no longer is
valid...I can work with the xml beans structure but I need acces to the
untouched, native, raw xml string that I used as a argument to the
factory.
XmlObject parse =
Sorry - but no good
From the javadoc
toString
String toString()
Returns an XML string for this XML object.
The string is pretty-printed. If you want a non-pretty-printed string, or
if you want to control options precisely, use the xmlText() methods.
/Nicolai
CSC ? This is a PRIVATE message.
For XML to be equivalent, things like namespace prefixes, whitespace*, etc
can be different. With Strings, this is not the case.
For example:
foo xmlns=http://foobaz; /
and
baz:foo xmlns:baz=http://foobaz; /
Are equivalent in XML.
If you are hoping to do an == check using the above with strings
Hopefully that works with XMLBeans because prefix declarations are maintained
:-)
But this won't:
foo
xmlns=http://foobaz/
because insignificant space is not tracked. When the documentation refers to
the original, native XML structure, it means the XML structure as defined by
the XML
9 matches
Mail list logo