Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Importing XML

Status
Not open for further replies.

ShamaJamms

Programmer
Joined
Mar 28, 2007
Messages
11
I am using CS2, and trying to import a simple XML file into InDesign. Tags and styles are correctly configured, because I am able to import an XML with one <root> successfully. However, it seems the problem occurs when I attempt to add a second <root> (which, if I understand correctly, is the only way to enter different data into InDesign frames in another document, using the same XML file).
Here is my code:



<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Root>
<name>name</name>
<number>number</number>
<address>address</address>
</Root>

<Root>
<name>name2</name>
<number>number2</number>
<address>address2</address>
</Root>



Ideas?
 
try:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Root>
<Root>
<name>name</name>
<number>number</number>
<address>address</address>
</Root>
<Root>
<name>name2</name>
<number>number2</number>
<address>address2</address>
</Root>
</Root>

in xml you can have only one root element.
in your's example exist 2 root element.

best regards,
cristian
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top