Import XML  Nested tags

Hi all
Here is my XML file structure
<book>
<section title="My Life">
<p>
<ol>
<li>item 1</li>
<li>item 2</li>
<li>item 3</li>
<li>item 4
    <ol>
        <li>item 1</li>
        <li>item 2</li>
        <li>item 3</li>
    </ol>
</li>
</ol>
</p>
</section>
</book>
I need to do two things from my XML file
one
I have a problem with importing my xml file. I have nested tags in my xml file. list inside list. While I am mapping tags to styles I am hang I can’t map different styles to my nested list 2nd level list. I am working with IDCS3. Is there any way to map my nested tag?
in short
list level One > Item 1
TagName: <li>
Paragraph style>ListIndentOne
list level Two > Item 1
TagName: <li>
Paragraph style>ListIndentTwo
two
The next problem is I need to pint the value of my tag variables into indesign document is this is possible?
<section title="My Life">
I need to print the value of the variable value "My Life" as title style in my document.
thanks in advance
reagrds
a r u l

Hi all
Here is my XML file structure
<book>
<section title="My Life">
<p>
<ol>
<li>item 1</li>
<li>item 2</li>
<li>item 3</li>
<li>item 4
    <ol>
        <li>item 1</li>
        <li>item 2</li>
        <li>item 3</li>
    </ol>
</li>
</ol>
</p>
</section>
</book>
I need to do two things from my XML file
one
I have a problem with importing my xml file. I have nested tags in my xml file. list inside list. While I am mapping tags to styles I am hang I can’t map different styles to my nested list 2nd level list. I am working with IDCS3. Is there any way to map my nested tag?
in short
list level One > Item 1
TagName: <li>
Paragraph style>ListIndentOne
list level Two > Item 1
TagName: <li>
Paragraph style>ListIndentTwo
two
The next problem is I need to pint the value of my tag variables into indesign document is this is possible?
<section title="My Life">
I need to print the value of the variable value "My Life" as title style in my document.
thanks in advance
reagrds
a r u l

Similar Messages

  • Creating XML nested tags as output in XML files

    Hello:
    My question is a little extraordinary compared to most users since I am
    primarily concerned with the xml output that is generated when a form is
    submitted and emailed to a recipient.
    Can anyone tell me if it is possible to design a form that can generate an xml file containing nested XML tags using Designer? (See sample output below).
    Example:
                 PARTIAL
                 MONOCLONAL ANTIBODY
    Our company needs this type of nested code for input so we can paste it into a database field we are testing. I have other concerns but I'll defer these to another forum question.
    Regards.
    Harold

    [email protected] wrote:<br />> Thanks for the reply. That really helped! To build on this, I have another question which really gets to my dilemma.<br />> <br />> Is there a way to program a numeric text field to control the number of instances of a subform? For example, I would like to have a nested subform appear twice in the form if the user enters 2 in the numeric field. But more importantly, I would like to see its corresponding XML output appear like the following:<br />> <br />> <SUBUNIT_1><br />>    <LENGTH></LENGTH><br />>    <SEQUENCE><br />>        ELEESGGGLVQPGGRQSPEKGLETHYAE<br />>    </SEQUENCE><br />>    <N_TERMINAL>Yes</N_TERMINAL><br />>    <C_TERMINAL></C_TERMINAL><br />> </SUBUNIT_1><br />> <br />> <SUBUNIT_2><br />>    <LENGTH></LENGTH><br />>    <SEQUENCE><br />>        ELEESGGGLVQPGGRQSPEKGLETHYAE<br />>    </SEQUENCE><br />>    <N_TERMINAL>No</N_TERMINAL><br />>    <C_TERMINAL></C_TERMINAL><br />> </SUBUNIT_2><br />> <br />> If you pay close attention to the above code, you will see that I want the parent tag's ending digit incremented each time the subform is repeated. <SUBUNIT_1> <SUBUNIT_2> <SUBUNIT_3> ect . . .<br />> <br />> That is the twist! Is this programmatically possible?<br />> <br />> I might mention that the numeric field is not included as part of the subform. It is part of another subform.<br />> <br />> Regards.<br />> <br />> Harold<br /><br />I am going to respond to your question with another question.  Why do <br />you want to do it in this manner?  What you are trying to do is change <br />your XML schema on the fly.  In my opinion, this is not a good idea, <br />because the data is no longer consistent.  Couldn't you just add an <br />index attribute to your xml?  For example:<br />  <SUBUNIT><br />     <INDEX>1</INDEX><br />     <LENGTH></LENGTH><br />     <SEQUENCE><br />         ELEESGGGLVQPGGRQSPEKGLETHYAE<br />     </SEQUENCE><br />     <N_TERMINAL>Yes</N_TERMINAL><br />     <C_TERMINAL></C_TERMINAL><br />  </SUBUNIT><br />  <SUBUNIT><br />     <INDEX>2</INDEX><br />     <LENGTH></LENGTH><br />     <SEQUENCE><br />         ELEESGGGLVQPGGRQSPEKGLETHYAE<br />     </SEQUENCE><br />     <N_TERMINAL>No</N_TERMINAL><br />     <C_TERMINAL></C_TERMINAL><br />  </SUBUNIT><br /><br /><br />   Justin Klei<br />   Cardinal Solutions Group<br />   www.cardinalsolutions.com

  • JDom + XML (nested tags) + JTree (Swing)

    I have an XML file that looks like this:
    <root>
      <subtree>
        <a name="John Doe">Here is one big string with information about john doe</a>
        <a name="Tom Smith">Another string</a>
      </subtree>
      <subtree>
        <subtree>
            <a name="abc">mlsjkfqm</a>
        </subtree>
        <subtree>
            <a name="def">qsmdlfkj</a>
             <subtree>
                <a name="ghi">mqsldjkf</a>
                <a name="jkl">mqlsdfjkq</a>
             </subtree>
        </subtree>
      </subtree>
    </root>I want to have this XML file viewed in a JTree. I was told I should use a JTreeModel to store the data in, and org.JDom to parse the data and put them in the JTreeModel. But I still don't see how...
    Can anyone please put me in the right direction, or give some examples of similar examples?
    (I found examples on the web, but they all use trees like <root><node>qsdf</node><node>qsfqsdf</node><node>...</node></root>, so no nested nodes, and I have a difference between <subtree> and <a>...)
    Thanks in advance!

    I want to have this XML file viewed in a JTree. I was
    told I should use a JTreeModel to store the data in,
    and org.JDom to parse the data and put them in the
    JTreeModel. But I still don't see how...
    By writing an Adapter, a JDOMTreeModel class that implements TreeModel by using the JDOM API. Then, you could instantiate a JTree from that JDomTreeModel...

  • a tag is creating error in import XML in InDesign CS5.5

    Hi All,
    I am doing upgrade from InDesign CS2 to InDesign CS5.5.
    I have indt file. It has been designed using the CS2 and now converted that indt file into CS5.5 using InDesign CS5.5.
    But I am facing some serious issue while doing export to pdf in CS5.5 version.
    I am following below steps:
    1) Open indt file.
    2) File Menu --> Import XML... [This XML file contains <a href="website link"> html tag]
    3) XML Import Options [no change- defalut options selected]
    4) Ideally it should merge this XML data with the indt file but it is asking me for some input and showing me "Find:" dialog [Check below snapshot]
    I did some research and find out that I am getting this Find dialog because of the <a> tag in XML. when I removed the <a> tag from XML then it didn't give any dialog box and imported XML without any issue.
    I am getting that xml from system and I cant remove the <a> tag from xml manually.
    However I was not getting any error while doing import XML in CS2 version.
    Please can anybody help in this?

    When there is "http://" in anchor tag it will pop up this input window in manual export from indd/indt to pdf and it will failed in export through action script.
    I communicated with the Adobe and it was bug. Adobe has confirmed that they would realease the patch for same sometime later, but I have not heard of anything. I got work around by removing it "http://" using java.

  • Importing XML Tags in a document

    Hello,
    I've been trying to import XML Tags in a .indd i created, using the Java API but it does not seem to work (the tags content don't update when i export the document as PDF).  I did the same actions in the InDesign CS4 GUI and it worked like it's supposed to.
    I ran the InDesign server using that command: InDesignServer -iorfile c:\ior.txt -pluginpath Server\Corba
    I included the .indd file, XML tags file and the Java code I wrote.
    EDIT:
    Also, document.getModified() is FALSE, even after calling document.loadXMLTags(...).
    When I exports the tags, all I get is this:
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <Root colorindex="0"><Tag colorindex="35"/></Root>
    document.countTextFrames() returns 4, which is what is expected.  However document.countXMLTags() returns 2, i'm guessing it's because all my tags are named <Tag...> (+ the <Root> element).  Could that be the cause of my problems?
    any help will be appreciated, thanks

    Import XML imports the entire XML file, including the tags and the content, into the document. In the UI, the result would be seen in the Structure View. You can then work with the imported tagged content.
    Load XML tags simply loads the tags into the tag list. In the UI, the result would be seen in the tags panel. (This command is also available from the tags panel.) No XML content is imported; only the tag list is populated. This is used when you just want the tags from a document, and you don't want the content. You can then tag new content using the same tags as the XML file.

  • I am not getting required output after importing xml file having HTML tags, MathML and Latex code

    I created well formatted xml having html tags, MathML code and Latex code inside
    XML with sample latex
    <question>
        <p> 8. In this problem, <Image  style="vertical-align: -9pt" title="5a\frac{7b}{3}" alt="5a\frac{7b}{3}" href="http://www.snapwiz.com/cgi-bin/mathtex.cgi?%205a%5Cfrac%7B7b%7D%7B3%7D%0A"></Image> and <Image href="http://www.snapwiz.com/cgi-bin/mathtex.cgi?%207b%5Cfrac%7B5a%7D%7B3%7D" style="vertical-align: -9pt" title="7b\frac{5a}{3}" alt="7b\frac{5a}{3}"> </Image>are both mixed numbers, like <Image src="http://www.snapwiz.com/cgi-bin/mathtex.cgi?%203%20%5Cfrac%7B1%7D%7B2%7D%20=%203.5" style="vertical-align: -9pt" title="3 \frac{1}{2} = 3.5" alt="3 \frac{1}{2} = 3.5"></Image>. The expression <Image style="vertical-align: -9pt" title="5a \frac{7b}{3} \ \times 7b \frac{5a}{3}" alt="5a \frac{7b}{3} \ \times 7b \frac{5a}{3}" href="http://www.snapwiz.com/cgi-bin/mathtex.cgi?%205a%20%5Cfrac%7B7b%7D%7B3%7D%20%5C%20%5Ctimes %207b%20%5Cfrac%7B5a%7D%7B3%7D"> </Image>is equal to which of the following choices? </p>
    </question>
    XML with sample html tags
    <p>4. Examine the expression 3<i>k</i><sup>2</sup> + 6<i>k</i> - 5 + 6<i>k</i><sup>2</sup> + 2.</p><p>When it is simplified, which of the following is the equivalent expression?</p>
    XML with sample MathML tags
    <p>5. Find the vertex of the parabola associated with the quadratic function <math xmlns="http://www.w3.org/1998/Math/MathML"><mi>y</mi><mo> </mo><mo>=</mo><mo> </mo><mo>-</mo><msup><mi>x</mi><mn>2</mn></msup><mo> </mo><mo>+</mo><mo> </mo><mn>10</mn><mi>x</mi><mo> </mo><mo>+</mo><mo> </mo><mn>4</mn></math></p>
        <math xmlns="http://www.w3.org/1998/Math/MathML"><mfenced><mrow><mo>-</mo><mn>5</mn><mo>,</mo><mo> </mo><mn>69</mn></mrow></mfenced></math><br>
        <math xmlns="http://www.w3.org/1998/Math/MathML"><mfenced><mrow><mn>5</mn><mo>,</mo><mo> </mo><mn>29</mn></mrow></mfenced></math><br>
        <math xmlns="http://www.w3.org/1998/Math/MathML"><mfenced><mrow><mn>5</mn><mo>,</mo><mo> </mo><mn>69</mn></mrow></mfenced></math><br>
        <math xmlns="http://www.w3.org/1998/Math/MathML"><mfenced><mrow><mo>-</mo><mn>5</mn><mo>,</mo><mo> </mo><mn>29</mn></mrow></mfenced></math>
    None of the above works fine after importing xml to Indesign document/templete, it is not renderting equivalent out instead it is showing the same text inside tags in the Indesign document.
    I have lot of content in our database, I will export to XML, import to Indesign, Indesign should render required output like what we see in the browser and export the output to printed format.
    Import formated XML to indesign --> Export to Quality Print Format
    Can any one guide me and let me know whether it is posible to do with Indesign, if so let me know in case if I am missing anything in importing xml and get required output.
    Thanks in advance. Waiting for reply ASAP.

    Possibly your expectations are too high. ... Scratch that "possibly".
    XML, in general, cannot be "rendered". It's just an abstract data format. Compare it to common markup such as *asterisks* to indicate emphasized words -- e-mail clients will show this text in bold, but InDesign, and the vast majority of other software, does not.
    To "render" XML, HTML, MathML, or LaTeX -- you seem to freely mix these *very* different markup formats, unaware of the fact that they are vastly different from each other! -- in the format you "expect", you need to apply the appropriate software to each of  the original data files. None of these markup languages are supported natively by InDesign.

  • Loading an XML with multiple nested tags

    I've got some problems dealing with loading a nested tags XML file.
    Let's suppose I have such a very simple myxml.xml file:
    <ROWDATA>
    <ROW>
      <EMPNO>7369</EMPNO>
      <ENAME>SMITH</ENAME>
       </ROW>
    <ROW>
      <EMPNO>7902</EMPNO>
      <ENAME>FORD</ENAME>
    </ROW>
    </ROWDATA>
    I can create the following table:
    create table EMP
    empno NUMBER(4) not null,
    ename VARCHAR2(10),
    and then inserting the XML file in this way:
    insert into EMP
        (empno, ename)
      select extractvalue (column_value, '/ROW/EMPNO'),
          extractvalue (column_value, '/ROW/ENAME'),
      from   table
               (xmlsequence
              (extract
               (xmltype
                 (bfilename ('MY_DIR', 'myxml.xml'),
                   nls_charset_id ('AL32UTF8')),
                 '/ROWDATA/ROW')))
    so as to get inserted two rows into my table:
    EMPNO   ENAME
    7369         SMITH
    7902         FORD
    Now, and this is my question, let's suppose I have such a “more difficult” XML:
    <ROWDATA>
    <ROW>
      <COMPANY>
        <EMPNO>7369</EMPNO>
        <ENAME>SMITH</ENAME>
        <EMPNO>1111</EMPNO>
        <ENAME>TAYLOR</ENAME>
      </COMPANY>
    </ROW>
    <ROW>
      <COMPANY>
       <EMPNO>7902</EMPNO>
       <ENAME>FORD</ENAME>
      </COMPANY>
    </ROW>
    <ROW>
      <COMPANY>
      </COMPANY>
    </ROW>
    </ROWDATA>
    In this case it seems to me things look harder 'cause for every row that I should insert into my table, I don't know how many “empno” and “ename” I'll find for each /ROW/COMPANY and so how could I define a table since the number of empno and ename columns are “unknown”?
    According to you, in that case should I load the whole XML file in an unique XMLType column and than “managing” its content by using EXTRACT and EXTRACTVALUE built-in funcions? But this looks a very difficult job.
    My Oracle version is 10gR2 Express Edition
    Thanks in advance!

    Here's a possible solution using a single pass through the XML data :
    with sample_data as (
      select xmltype(
        '<ROWDATA>
        <ROW>
          <COMPANY>
            <EMPNO>7369</EMPNO>
            <ENAME>SMITH</ENAME>
            <EMPNO>1111</EMPNO>
            <ENAME>TAYLOR</ENAME>
          </COMPANY>
        </ROW>
        <ROW>
          <COMPANY>
           <EMPNO>7902</EMPNO>
           <ENAME>FORD</ENAME>
          </COMPANY>
        </ROW> 
      </ROWDATA>'
      ) doc
      from dual
    select min(case when node_name = 'EMPNO' then node_value end) as empno
         , min(case when node_name = 'ENAME' then node_value end) as ename
    from (
      select trunc((rownum-1)/2) as rn
           , extractvalue(value(x), '.') as node_value
           , value(x).getrootelement() as node_name
      from sample_data t
         , table(
             xmlsequence(extract(t.doc, '/ROWDATA/ROW/COMPANY/*'))
           ) x
    group by rn ;
    I would be cautious with this approach though, as I'm not sure the ROWNUM projection is entirely deterministic.
    As Jason said, it's probably safer to first apply a transformation in order to get a more friendly format.
    For example :
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
      <xsl:template match="node()|@*">
        <xsl:copy>
          <xsl:apply-templates select="node()|@*"/>
        </xsl:copy>
      </xsl:template>
      <xsl:template match="COMPANY">
        <xsl:apply-templates select="EMPNO"/>
      </xsl:template>
      <xsl:template match="EMPNO">
        <EMP>
          <xsl:copy-of select="."/>
          <xsl:copy-of select="following-sibling::ENAME[1]"/>
        </EMP>
      </xsl:template>
    </xsl:stylesheet>

  • Importing XML - white spaces before tags

    Hello,
    I'm importing XML into an inDesign document. Everything imports fine but I get extra spaces whenever there is a paragraph return. How could I get rid of those extra white spaces? I don't want to go and edit out all those white spaces by hand....
    Thanks for your help.

    Hello,
    Your issue looks like the one described in this page:
    http://www.xmlplease.com/normalized
    For reference purposes, here is the link for the supported schema and wsdl in PI 7.1
    http://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/00a9a425-1769-2a10-9196-bd8eeed72e4c
    As a temporary work around, you can try editing the xsd by removing the spaces before importing it into PI.
    Hope this helps,
    Mark

  • Can't Figure Out How To Import XML into a Table?

    HELP!
    I've been using InDesign for several years now... but everything Ive ever done has been basic one off layout concepts.
    I am working on a website for a musical theater actress and for her resume, Id like to make a PDF which lists in table format the show, theatre and role she had for each job.
    I could do this manually... but Id really like to learn how to just reuse the same XML data that I have for her website and import it into InDesign.
    I have looked at Adobe's help file, I have scoured the internet, and I still can't figure it out... I have done like the adobe support file says... and I cant seem to get the values I create in her resume xml file to show up in a table I create in InDesign.
    I even tried to simplify it for the learning process and did something as basic as an XML file that has 5 colors... couldnt even get that working.
    So could someone explain it to me like Im a 5 year old... how to take a XML file, import it, place it in a table and have the data actually show up in the table.
    thanks,
    brian

    Are you sure you want to use XML with tables for this? No doubt importing XML into tables is useful for some specialized tasks, such as importing formatting information inside the XML itself, but for most of the familiar tasks that XML excels at, tables are neither necessary nor useful.
    In my (limited) experience, if the XML elements are well-differentiated, by which I mean different types of data have their own distinctive tags, then the special powers of XML can be exploited more fully using the more familiar tagged text, nested tags etc. in ordinary text frames using paragraph breaks, tab characters, etc. to achieve a suitably "tabular" finished appearance.
    If you must import XML into tables, I recommend Adobe's own PDF "Adobe InDesign CS3 and XML: A Technical Reference" availabe here:
    http://www.adobe.com/designcenter/indesign/articles/indcs3ip_xmlrules.pdf
    It sounds very daunting -- the words "technical reference" make me shudder -- but actually it's very readable and not very technical at all. Some nice pics and everything!
    Jeremy

  • How to import XML into SQL Table

    Dear all,
    There are a lot of books about exporting data into XML format.
    Actually, how to use XML Documents? Sorry I am new that I ask such a question.
    What i think may be exchange or save data using xml. If so, How to import into MS SQL table? Do it need to do any mapping?
    Appreciate for your hints

    Are you sure you want to use XML with tables for this? No doubt importing XML into tables is useful for some specialized tasks, such as importing formatting information inside the XML itself, but for most of the familiar tasks that XML excels at, tables are neither necessary nor useful.
    In my (limited) experience, if the XML elements are well-differentiated, by which I mean different types of data have their own distinctive tags, then the special powers of XML can be exploited more fully using the more familiar tagged text, nested tags etc. in ordinary text frames using paragraph breaks, tab characters, etc. to achieve a suitably "tabular" finished appearance.
    If you must import XML into tables, I recommend Adobe's own PDF "Adobe InDesign CS3 and XML: A Technical Reference" availabe here:
    http://www.adobe.com/designcenter/indesign/articles/indcs3ip_xmlrules.pdf
    It sounds very daunting -- the words "technical reference" make me shudder -- but actually it's very readable and not very technical at all. Some nice pics and everything!
    Jeremy

  • I need to know how to import xml files into indesign cs6.

    My client wants to send me xml text files to import into Indesign for a multi-page publication. I don't have a clue where to start. Can you point me to a tutorial that would help me figure this out?
    I have a sample file that looks like this:
    <?xml version="1.0"?>
    <providers>
      <provider>
        <name>Bow Valley College</name>
        <description>Putting the Community back in college&#x2026;in the Bow Corrid
    ANY TIME, ANY PLACE, ANY PATH, ANY PACE LEARNING.
    Designated as the comprehensive community college for Calgary &amp; its
    surrounding region, Bow Valley College offers you learning opportunities
    through flexible delivery options, including classrooms, online or self
    paced modules. Whether you are taking a course for interest, to enhance
    your career skills or to finish high school you have access to all of the
    traditional Bow Valley College student supports.
    Visit our website [2] or come see us at our Canmore campus.
    BOW VALLEY LEARNING COUNCIL MEMBER.
    Links:
    [1] http://www.bowvalleycollege.ca/bow-corridor.html
    </description>
        <contact_information>Canmore Campus
    Provincial Building, 800 Railway Ave.
    Canmore, AB&#xA0; T1W 1P1
    OFFICE HOURS: 8:30am - 4:30pm, Monday - Friday (except from 12 - 1pm)
    PHONE: (403) 678-3125
    FAX: (403) 678-3127
    BANFF CAMPUS: Lower Level, Banff YWCA, 102 Spray Ave., Banff (ONLY OPEN
    WHEN COURSES OFFERED).&#xA0;</contact_information>
        <email>[email protected]</email>
        <website>www.bowvalleycollege.ca/bow-corridor</website>
        <registration_information>Cancellation policy: Once your course has begun no refunds or credits will
    be given. Compassionate grounds may be considered with official
    documentation. There are no refunds, transfers, or credits if you cancel
    within one week of the course start date.
    BY PHONE: (403) 678-3125. Payment by Visa or Mastercard
    IN PERSON: Canmore Campus, Provincial Building, 800 Railway Ave., Canmore.
    Payment by cash, Visa or Mastercard.
    &#xA0;
    FUNDING ASSISTANCE&#xA0;MAY BE AVAILABLE FOR THOSE ON A LOW INCOME ON SOME
    COURSES. PLEASE ASK FOR MORE INFORMATION.</registration_information>
        <courses>
          <course>
            <title>Computer Basics/Windows 7 - Instructor led, Canmore</title>
            <description>An instructor will lead the class through the basic features of Microsoft
    Windows, the Internet and Email. Find out how to start programs, create,
    save and organize your files and use the online help feature. You&#x2019;ll also
    get an introduction to surfing the internet and setting up an email
    account. This course is designed for those with little or no computer
    experience &#x2013; and is still our most popular course. 18 HR COURSE.</description>
            <schedule_entries>
              <entry>
                <date>Mon 6:30 - 9 pm, Oct 7 - Dec 2</date>
                <date>Thu 6:30 - 9 pm, Oct 10 - Dec 5</date>
              </entry>
            </schedule_entries>
          </course>
          <course>
            <title>Word 2010 Introduction - Self-paced</title>
            <description>Explore the basics of Microsoft Word to produce professional letters and
    documents. This course guides you through the effective use of the Word
    Ribbon and Quick Access Toolbar. You&#x2019;ll learn how to efficiently edit,
    move and copy text; manipulate fonts; apply bullets and numbering; borders
    and shading; insert and re-size Clip Art; enter headers and footers; insert
    page numbers; set alignment and indents; and change page settings. You&#x2019;ll
    learn to use the AutoCorrect feature and finish documents using the
    spelling, thesaurus and grammar features.
    Self-paced, 18 hr course.
    Prerequisite recommended: Computer Basics or equivalent experience.</description>
            <schedule_entries>
              <entry>
                <date>Mon 7:30 - 9 pm, Oct 7</date>
                <date>Thu 7:30 - 9 pm, Dec 5</date>
              </entry>
            </schedule_entries>
          </course>
          <course>
    AND SO ON...FOR 64 PAGES WORTH OF CONTENT
    HELP!!!
    SGAREN

    Hello Sally,
    First, I have only heard/read good things about the book Steve recommends. It is on my to buy list one day. Been awaiting a long deserved vaction to pick it up to read.
    I approach XML files pretty much like I do any text file I am sent in that I will import or copy/paste a text file into a frame in ID and begin setting my styles. With XML, though, I first clean it up, move closing tags up to their logical close lines, remove spurious codes that mean something in HTML but don't necessarily belong in the XML file (like &#x2019 which is an apostrophe so I do a search and replace. But for &#xA0; which is a non-breaking space I simply search and replace with a regular space in general), and make sure the XML validates.
    Validation is much like making sure an HTML page is formed properly. I use an XML editor (XML BluePrint) and a text editor (UltraEdit) for these tasks. If I had to only have one or the other, I suppose the XML editor is what I would use.
    I always show the import options when I import the XML and make sure that I link to the file.
    So once a sample of the XML is on a page in ID (via File | Import XML), I highlight text within a tag, say like in your example above, the Providor name, and make it like I want and then create a new style. I generally name the styles as per the XML tag. Later on, that makes mapping tags to styles a little easier.
    Once I set up all the styles preliminarily, I map the tags to styles. You can do that either via the Tags palette or via the Structure Pane that will appear once the XML is imported. In both cases, it is found via the flyout menu at the top right of their respective windows.
    After mapping my styles to the tags, I select the root element in the Structure Pane (the topmost element. In your sample above it is "providors" and delete it. This removes the XML in your ID file. But the styles and tags are still present.
    Then I import the XML again and look to makes sure all the tags/elements are styled as intended. I then correct any errors/ommissions. Then...I'll delete the XML again and import the full XML file.
    I can upload what I did with your XML sample above so you can compare it to your source file if you would like. You would then see how/where I moved tags. Now, moving the tags is only "necessary" to avoid all the extra blank paragraphs. That can be accomplished by ID's search/replace, too. But I like to start out with the XML cleaned up, so I take the few minutes to do it.
    Take care, Mike

  • When Importing XML table using "merge content" I get content but none of the formatting

    I'm just wondering, is this by design?
    I generated this by exporting a table.
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <Root>
    <Story>
    <Table tblName="tsBasicTable" xmlns:aid="http://ns.adobe.com/AdobeInDesign/4.0/" xmlns:aid5="http://ns.adobe.com/AdobeInDesign/5.0/" aid5:tablestyle="tsBasicBody" aid:table="table" aid:trows="7" aid:tcols="9">
    <Cell aid:table="cell" aid:crows="1" aid:ccols="1" aid:ccolwidth="24.0"/>
    <Cell aid:table="cell" aid:crows="1" aid:ccols="2">Alcohol</Cell>
    <Cell aid:table="cell" aid:crows="1" aid:ccols="2">Tobacco</Cell>
    <Cell aid:table="cell" aid:crows="1" aid:ccols="2">Marijuana</Cell>
    <Cell aid:table="cell" aid:crows="1" aid:ccols="2">Prescription drugs</Cell>
    <Cell aid:table="cell" aid:crows="1" aid:ccols="1" aid:ccolwidth="24.0">Grade</Cell>
    <Cell aid:table="cell" aid:crows="1" aid:ccols="1" aid:ccolwidth="64.0">Town 2013</Cell>
    <Cell aid:table="cell" aid:crows="1" aid:ccols="1" aid:ccolwidth="64.0">State 2013</Cell>
    <Cell aid:table="cell" aid:crows="1" aid:ccols="1" aid:ccolwidth="64.0">Town 2013</Cell>
    <Cell aid:table="cell" aid:crows="1" aid:ccols="1" aid:ccolwidth="64.0">State 2013</Cell>
    <Cell aid:table="cell" aid:crows="1" aid:ccols="1" aid:ccolwidth="64.0">Town 2013</Cell>
    <Cell aid:table="cell" aid:crows="1" aid:ccols="1" aid:ccolwidth="64.0">State 2013</Cell>
    <Cell aid:table="cell" aid:crows="1" aid:ccols="1" aid:ccolwidth="64.0">Town 2013</Cell>
    <Cell aid:table="cell" aid:crows="1" aid:ccols="1" aid:ccolwidth="64.0">State 2013</Cell>
    <Cell aid:table="cell" aid:crows="1" aid:ccols="1" aid:ccolwidth="24.0">6</Cell>
    <Cell aid:table="cell" aid:crows="1" aid:ccols="1" aid:ccolwidth="64.0">9.0</Cell>
    <Cell aid:table="cell" aid:crows="1" aid:ccols="1" aid:ccolwidth="64.0">10.2</Cell>
    <Cell aid:table="cell" aid:crows="1" aid:ccols="1" aid:ccolwidth="64.0">4.2</Cell>
    <Cell aid:table="cell" aid:crows="1" aid:ccols="1" aid:ccolwidth="64.0">2.4</Cell>
    <Cell aid:table="cell" aid:crows="1" aid:ccols="1" aid:ccolwidth="64.0">9.6</Cell>
    <Cell aid:table="cell" aid:crows="1" aid:ccols="1" aid:ccolwidth="64.0">7.2</Cell>
    <Cell aid:table="cell" aid:crows="1" aid:ccols="1" aid:ccolwidth="64.0">8.4</Cell>
    <Cell aid:table="cell" aid:crows="1" aid:ccols="1" aid:ccolwidth="64.0">11.4</Cell>
    <Cell aid:table="cell" aid:crows="1" aid:ccols="1" aid:ccolwidth="24.0">8</Cell>
    <Cell aid:table="cell" aid:crows="1" aid:ccols="1" aid:ccolwidth="64.0">12.0</Cell>
    <Cell aid:table="cell" aid:crows="1" aid:ccols="1" aid:ccolwidth="64.0">15.2</Cell>
    <Cell aid:table="cell" aid:crows="1" aid:ccols="1" aid:ccolwidth="64.0">15.2</Cell>
    <Cell aid:table="cell" aid:crows="1" aid:ccols="1" aid:ccolwidth="64.0">12.8</Cell>
    <Cell aid:table="cell" aid:crows="1" aid:ccols="1" aid:ccolwidth="64.0">13.6</Cell>
    <Cell aid:table="cell" aid:crows="1" aid:ccols="1" aid:ccolwidth="64.0">15.2</Cell>
    <Cell aid:table="cell" aid:crows="1" aid:ccols="1" aid:ccolwidth="64.0">4.8</Cell>
    <Cell aid:table="cell" aid:crows="1" aid:ccols="1" aid:ccolwidth="64.0">10.4</Cell>
    <Cell aid:table="cell" aid:crows="1" aid:ccols="1" aid:ccolwidth="24.0">10</Cell>
    <Cell aid:table="cell" aid:crows="1" aid:ccols="1" aid:ccolwidth="64.0">9.0</Cell>
    <Cell aid:table="cell" aid:crows="1" aid:ccols="1" aid:ccolwidth="64.0">17.0</Cell>
    <Cell aid:table="cell" aid:crows="1" aid:ccols="1" aid:ccolwidth="64.0">46.0</Cell>
    <Cell aid:table="cell" aid:crows="1" aid:ccols="1" aid:ccolwidth="64.0">44.0</Cell>
    <Cell aid:table="cell" aid:crows="1" aid:ccols="1" aid:ccolwidth="64.0">5.0</Cell>
    <Cell aid:table="cell" aid:crows="1" aid:ccols="1" aid:ccolwidth="64.0">2.0</Cell>
    <Cell aid:table="cell" aid:crows="1" aid:ccols="1" aid:ccolwidth="64.0">38.0</Cell>
    <Cell aid:table="cell" aid:crows="1" aid:ccols="1" aid:ccolwidth="64.0">50.0</Cell>
    <Cell aid:table="cell" aid:crows="1" aid:ccols="1" aid:ccolwidth="24.0">12</Cell>
    <Cell aid:table="cell" aid:crows="1" aid:ccols="1" aid:ccolwidth="64.0">12.0</Cell>
    <Cell aid:table="cell" aid:crows="1" aid:ccols="1" aid:ccolwidth="64.0">19.2</Cell>
    <Cell aid:table="cell" aid:crows="1" aid:ccols="1" aid:ccolwidth="64.0">14.4</Cell>
    <Cell aid:table="cell" aid:crows="1" aid:ccols="1" aid:ccolwidth="64.0">14.4</Cell>
    <Cell aid:table="cell" aid:crows="1" aid:ccols="1" aid:ccolwidth="64.0">16.8</Cell>
    <Cell aid:table="cell" aid:crows="1" aid:ccols="1" aid:ccolwidth="64.0">32.4</Cell>
    <Cell aid:table="cell" aid:crows="1" aid:ccols="1" aid:ccolwidth="64.0">19.2</Cell>
    <Cell aid:table="cell" aid:crows="1" aid:ccols="1" aid:ccolwidth="64.0">22.8</Cell>
    <Cell aid:table="cell" aid:crows="1" aid:ccols="1" aid:ccolwidth="24.0">All</Cell>
    <Cell aid:table="cell" aid:crows="1" aid:ccols="1" aid:ccolwidth="64.0">10.5</Cell>
    <Cell aid:table="cell" aid:crows="1" aid:ccols="1" aid:ccolwidth="64.0">15.4</Cell>
    <Cell aid:table="cell" aid:crows="1" aid:ccols="1" aid:ccolwidth="64.0">20.0</Cell>
    <Cell aid:table="cell" aid:crows="1" aid:ccols="1" aid:ccolwidth="64.0">18.4</Cell>
    <Cell aid:table="cell" aid:crows="1" aid:ccols="1" aid:ccolwidth="64.0">11.3</Cell>
    <Cell aid:table="cell" aid:crows="1" aid:ccols="1" aid:ccolwidth="64.0">14.2</Cell>
    <Cell aid:table="cell" aid:crows="1" aid:ccols="1" aid:ccolwidth="64.0">17.6</Cell>
    <Cell aid:table="cell" aid:crows="1" aid:ccols="1" aid:ccolwidth="64.0">23.7</Cell>
    </Table>
    </Story>
    </Root>
    Say I take that XML, change all instances of aid:ccolwidth="24.0" to aid:ccolwidth="26.0" and replace
    <Cell aid:table="cell" aid:crows="1" aid:ccols="2">Alcohol</Cell>
    with
    <Cell aid:table="cell" aid:crows="1" aid:ccols="2">Alcoholism</Cell>
    'I save that XML.
    In ID: Import XML... selecting "Merge Content", "only import elements that match existing structure" & "import text elements into tables if tags match"
    The cell with "Alcohol" updates, but the column widths don't change.
    Is this by design?
    When I select "Append Content" I get a (new) table with the formatting (column widths) as specified in the updated aid:ccolwidth and of course, the updated content. When merging content are you giving up all rights to updating formatting at the same time?
    Thanks in advance for any insights.

    Hello,
    The existence check on the Salutation descriptor is likely check cache, as it is the default. Because of this, when you merge the Salutation with id=2, it will check the cache and not find it and so register it as a new object instead. You have 2 options, the first is to read it instead of creating it new. The second is to change your existence checking option so that it will either go tothe database or assume existence so that it is more appropriate for how you intend to use these types of objects in your mappings. For instance, if you never plan to create new ones, assume existence might be more appropriate.
    I suspect though that for most applications, reading the object first is the best option performance wise.
    Best Regards,
    Chris

  • Importing XML using AppleScript in CS5.

    Hi, totally new to inDesign but do programming and database work.  I am looking to import an XML file created from our database.  I can do a basic import manually after creating document and importing xml to load tags then creating text box element and tagging it and placeholder text.  Now trying to automate using AppleScript.  Found some samples from inDesign but not sure how to tie all the pieces together.  Does anyone have a simple example that takes a small XML file and loads a few records automatcally into indesign.  Maybe, create new document, create textbox element and create text placeholders and tags then import xml file?
    Thanks,
    Joe

    I don't work in applescript, but:
    Does anyone have a simple example that takes a small XML file and loads a few records automatcally into indesign.  Maybe, create new document, create textbox element and create text placeholders and tags then import xml file?
    Err, when you say "records," you have me slightly concerned.
    Because it is quite difficult to get Data Merge -like functoinality with XML.
    Have you tested (and validated!) this workflow withoutscripting?

  • Custom taglib with nested tag not working

    Hi everybody,
    I have a question concerning a custom taglib. I want to create a tag with nested child tags. The parent tag is some kind of iterator, the child elements shall do something with each iterated object. The parent tag extends BodyTagSupport, i have overriden the methods doInitBody and doAfterBody. doInitBody initializes the iterator and puts the first object in the pageContext to be used by the child tag. doAfterBody gets the next iterator object and puts that in the pageContext, if possible. It returns with BodyTag.EVAL_BODY_AGAIN when another object is available, otherwise BodyTag.SKIP_BODY.
    The child tag extends SimpleTagSupport and does something with the given object, if it's there.
    In the tld-file I have configured both tags with name, class and body-content (tagdependent for the parent, empty for the child).
    The parent tag is being executed as I expected. But unfortunately the nested child tag does not get executed. If I define that one outside of its parent, it works fine (without object, of course).
    Can somebody tell me what I might have missed? Do I have to do something special with a nested tag inside a custom tag?
    Any help is greatly appreciated!
    Thanks a lot in advance!
    Greetings,
    Peter

    Hi again,
    unfortunately this didn't work.
    I prepared a simple example to show what isn't working. Perhaps it's easier then to show what my problem is:
    I have the following two tag classes:
    public class TestIterator extends BodyTagSupport {
        private Iterator testIteratorChild;
        @Override
        public void doInitBody() throws JspException {
            super.doInitBody();
            System.out.println("TestIterator: doInitBody");
            List list = Arrays.asList(new String[] { "one", "two", "three" });
            testIteratorChild = list.iterator();
        @Override
        public int doAfterBody() throws JspException {
            int result = BodyTag.SKIP_BODY;
            System.out.println("TestIterator: doAfterBody");
            if (testIteratorChild.hasNext()) {
                pageContext.setAttribute("child", testIteratorChild.next());
                result = BodyTag.EVAL_BODY_AGAIN;
            return result;
    public class TestIteratorChild extends SimpleTagSupport {
        @Override
        public void doTag() throws JspException, IOException {
            super.doTag();
            System.out.println(getJspContext().getAttribute("child"));
            System.out.println("TestIteratorChild: doTag");
    }The Iterator is the parent tag, the Child shall be shown in each iteration. My taglib.tld looks like the following:
    <?xml version="1.0" encoding="UTF-8"?>
    <taglib
         xsi:schemaLocation="http://java.sun.com/xml/ns/javaee web-jsptaglibrary_2_1.xsd"
         xmlns="http://java.sun.com/xml/ns/javaee"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.1">
         <tlib-version>1.0</tlib-version>
         <short-name>cms-taglib</short-name>
         <uri>http://www.pgoetz.de/taglibs/cms</uri>
         <tag>
              <name>test-iterator</name>
              <tag-class>de.pgoetz.cms.taglib.TestIterator</tag-class>
              <body-content>tagdependent</body-content>
         </tag>
         <tag>
              <name>test-iterator-child</name>
              <tag-class>de.pgoetz.cms.taglib.TestIteratorChild</tag-class>
              <body-content>empty</body-content>
         </tag>
    </taglib>And the snippet of my jsp is as follows:
         <!-- TestIterator -->
         <cms:test-iterator>
              <cms:test-iterator-child />
         </cms:test-iterator>The result is that on my console I get the following output:
    09:28:01,656 INFO [STDOUT] TestIterator: doInitBody
    09:28:01,656 INFO [STDOUT] TestIterator: doAfterBody
    09:28:01,656 INFO [STDOUT] TestIterator: doAfterBody
    09:28:01,656 INFO [STDOUT] TestIterator: doAfterBody
    09:28:01,656 INFO [STDOUT] TestIterator: doAfterBody
    So the child is never executed.
    It would be a great help if anybody could tell me what's going wrong here.
    Thanks and greetings from germany!
    Peter
    Message was edited by:
    Peter_Goetz

  • Error when import XML

    I am dealing with a INDD file with XML structure, after import the XML there is always an error occured when I validate it
    How to declare it in DTD? Or any way to avoid it?

    Especially if you are importing XML with tables, I would recommend creating an ID document with tables, either use the auto-tagging or create your own tags based upon your XML, then exporting it to look how the XML is formed.
    Using the namespace as part of the table element should look roughly like this in your XML:
    <Table xmlns:aid="http://ns.adobe.com/AdobeInDesign/4.0/" aid:table="table" aid:trows="8" aid:tcols="5">
    The above is simply from a quick export of a table in ID. But note that the definitions, the declaration, of what the element parts are follows the namespace portion.
    Mike

Maybe you are looking for

  • Printer Options for HP LJ 3015 Not working

    Hi, I am unable to get the duplex option to appear for my HP LaserJet 3015 (all in one printer). This is my first mac (OS X 10.5.8). I have downloaded the latest driver and software from the HP web site. I've spent over an hour on the phone with appl

  • Raw converter canon eos 7d mk 2

    I have been a element user since version 7. 11 months ago i bought my update for the version 12.  1 months ago i bought the Canon 7d mk2, and the elements 12 can not konvert the camera rawfile.  Why not? Regards Poul

  • Add-On expiry; 30 days or next billing day (rolling 1-month data only contract).

    I'm on a rolling monthly data-only sim/contract. I was running low on my data allowance for this month, so I've added a 10Gb add-on. At each point during the buying process it stated this add-on would expire at my next billing date (about 5 days time

  • Failed to send Alert Message to Browser

    We are gettign this problem intermittently when user click End or Hangup button. We are not triggering any alert on these events. Once the user get this problem, he /she has to reboot the system in order to come out of this error. I was looking SND f

  • Error in DO_INIT_CONTEXT method

    Hi Experts, We have created a new view & controller by making a copy of ‘IRecHistory.htm’ & ‘IRecHistory.do’. We have also created a new context class for the new controller. …CTXT We are facing an error at DO_INIT_CONTEXT method the code in the meth