Some hours of hard work to find a workaround for this issue...I hope that it will help some of you
as this simple issue should be quite common.
Here is a sample xml that reveal the issue (sample.xml):
1: <?xml version="1.0" encoding="UTF-8"?>
2: <address xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3: xmlns="http://www.example.com/test"
4: xsi:schemaLocation="http://www.example.com/test sample.xsd">
5: <name>name</name>
6: <street>street</street>
7: <city>city</city>
8: <country>country</country>
9: </address>
A very simple XSD schema (sample.xsd)
1: <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2: <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
3: targetNamespace="http://www.example.com/test"
4: xmlns="http://www.example.com/test">
5: <xs:element name="address">
6: <xs:complexType>
7: <xs:sequence>
8: <xs:element name="name" type="xs:string" />
9: <xs:element name="street" type="xs:string" />
10: <xs:element name="city" type="xs:string" />
11: <xs:element name="country" type="xs:string" />
12: </xs:sequence>
13: </xs:complexType>
14: </xs:element>
15: </xs:schema>
Read more: Make JXPATH 1.2 namespace aware
Privacy Statement | Copyright Notice | Licenses
© 1999-2012 Waltercedric.com. Designed by Cédric Walter. Sitemap
Reproduction without explicit permission is prohibited. All Rights Reserved. All photos remain copyright © their rightful owners. No copyright infringement is intended.
Disclaimer: The editor(s) reserve the right to edit any comments that are found to be abusive, offensive, contain profanity, serves as spam, is largely self-promotional, or displaying attempts to harbour irrelevant text links for any purpose.