Error: XML document structures must start and end within the same entity -


i new xml , getting below error:

error: xml document structures must start , end within same entity

input xml:

<?xml version="1.0" encoding="iso-8859-1"?> <root> <test> <access1>113al</access1> <access2>119al</access2> </test> <test> <access2>115al<s/access2> <access3>116al</access3> </test> <test> <access4>118al</access4> <access5>119al</access5> </test> <copies> <test2> <access>113al</access> <copy>y</copy> </test2> <test2> <access>113ax</access> <copy>n</copy> </test2> </copies> </root> 

your xml not well-formed. in general, error indicates wrong range of start , end tags.

in particular in case, have stray s in 1 of closing access2 tags:

    <access2>115al<s/access2> 

here xml problem resolved; well-formed (and indented improve readability):

<?xml version="1.0" encoding="iso-8859-1"?> <root>   <test>     <access1>113al</access1>     <access2>119al</access2>   </test>   <test>     <access2>115al</access2>     <access3>116al</access3>   </test>   <test>     <access4>118al</access4>     <access5>119al</access5>   </test>   <copies>     <test2>       <access>113al</access>       <copy>y</copy>     </test2>     <test2>       <access>113ax</access>       <copy>n</copy>     </test2>   </copies> </root> 

Comments

Popular posts from this blog

javascript - Laravel datatable invalid JSON response -

java - Exception in thread "main" org.springframework.context.ApplicationContextException: Unable to start embedded container; -

sql server 2008 - My Sql Code Get An Error Of Msg 245, Level 16, State 1, Line 1 Conversion failed when converting the varchar value '8:45 AM' to data type int -