XML InDesign Q: Why are paragraph returns disappearing?

Hi, excellent mass mind of the Forums!
I have a question. I thought this would be a piece of cake, but it's turning out not to be: how can I make sure that imported XML respects the paragraph returns I have in my InDesign document? I've done it fine in the past, but THIS! agh!
No matter how I try I can't get the paragraph returns to stay in after I import the XML. I *do* have these mapped to separate paragraph styles.
The document can look just like this before I export the XML:
The exported XML looks like this:

     <Root>
<LOGO href="filepathremovedforprivacy"/>

     <Story>
<FIRSTNAME>Export</FIRSTNAME>
<MIDNAME>J</MIDNAME>
<LASTNAME>Testdata</LASTNAME>
<TITLE>President</TITLE>
<COMPANY>Testcompany</COMPANY>
<EMAIL>[email protected]</EMAIL>
</Story>
</Root>
And when I import it the paragraph returns disappear:
What am I missing?

Hi Eva,
I've done it into an empty box before and it *has* brought in paragraph returns, which is why this is so frustrating!
Is it possible that you had the "Do not import contents of whitespace-only elements" option unchecked when you did that? (That might not be the real reason, however -- XML's always a bit of a tricky customer!)
I'm not leaving tags because I don't necessarily know if each person is going to have all the information in each field. Some might have a company name, for instance, some not, and I don't want to leave blank lines on the nametag.
The option "Delete elements, frames, and content that do not match imported XML" is designed to make sure that never happens. It does so very well, but you'll have to make sure you have your paragraph returns in the right places, inside or outside the relevant tags, as required.
The more you do this sort of stuff the more you realize how much trial and error is involved. My advice is to get some sample XML, exactly like the stuff you'll be using when you get your template worked out, in all respects but size.
I know this job would be much easier to do as a data merge, but the client specifically asked for XML.
There is a little "trick" for turning data merge into XML by putting data merge stuff onto a master page. I messed about with it a bit last year, but got bored, and I've forgotten it all at this stage. Worth bearing in mind though.
Trial and error is definitely the way to go with this stuff.
Jeremy

Similar Messages

  • Why are my styles disappearing when I cut and paste?

    Why are my styles disappearing when I cut and paste?

    Go to Preferences, and then into ClipboardHandling. Click a radio button choice for All Information instead of Text Only.

  • Why are my screensavers disappearing in Lion?

    Why are my screen-savers disappearing in Lion?  Word of the day -- gone!  Is there anyway to get them back or do I have to wait until Apple offers a fix?

    The very same thing happened to me.  I was an early adopter of Lion and haven't had a single issue with it -- until yesterday.  I haven't shut down, I haven't installed any new updates, I haven't manually deleted anything.  It has all been "business as usual" then my laptop's screensaver turned on and had a black background with simply the words "word of the day" scrolling across the screen.  My screensaver turns on multiple times per day so this isn't just something that went unnnoticed.  Now the only options I have are "flurry" and "computer name" -- no thanks!

  • Why are my posts disappearing?

    I have recently posted twice, seen them appear in the forum, then magically disappear a short while later.
    Is Verizon censoring the forums? There has never been any foul language or names in my posts.
    Just curious...

    So if they are reading the posts - which by the way are a good warning for anyone else potentially sending their phone to Verizon - wouldn't the correct way to deal with the situation be to deal with the problem?
    I do not understand why they want to treat customers like this, I really don't. I have been lied to over and over and over. They let me "try" a Note 2. It did not have the dropped call problem, but I HATE it, so they sent another DNA. It dropped a call within hours of activating it. I contacted support again and they said because I had 3 phones not returned (including the one I just activated), they couldn't send another DNA. So I waited until tracking showed them all delivered and contacted them again. It was at that point they said "you have the comparable replacement and are NEVER getting the phone you paid for."
    So at some point during that week, they totally screwed me over, stole the phone I have a receipt for, and stuck my with a piece of crap that even Samsung did not intend to be comparable. One is a phablet, one is a phone. Different uses, different customers. The Samsung "comparable" phone is the S4 which is only a few months newer than the DNA.

  • Why are most photos disappearing from albums in iWeb?

    I'm having a problem with the photo albums on iWeb.
    I drag a photo album from my iPhoto window in iWeb to the photo album web page and it becomes an album with slideshow capabilities. If I publish the site, everything appears fine. I save iWeb and exit.
    Now if I open iWeb again, all three of the photo album pages still exist, but on each page, only four of the original photos remain. The albums are supposed to have 29 photos, 35 photos, and 46 photos total. Now they each show four.
    I thought it was a fluke, so I added them all again including captions. Then I saved, closed and reopened iWeb. The photos in the web albums were gone again.
    I'm using iLife '09 with the iPhoto that exists on my laptop, but all the source photos are located on a Mac Mini in my local network. Any ideas on why this is happening and how I can fix it?
    Note that the complete album as uploaded to the actual website still exists and works great. But if I publish the changes, the album will disappear.
    Thanks.

    Look under "More like this" on the right of this page, specifically "Re: no photo selected"; the discussion there may be of help.

  • Why are my photos disappearing from my camera roll?

    I just recently got a new iPhone 6 and my photos from my camera are disappearing everyday. I don't know why because i have plenty of space on my phone and even bought the 20 GB iCloud monthly plan. I used to have a little over a thousand pictures and now if you go to the top of the camera roll they will disappear in order everyday and generally stays around 300 pictures but fluctuates daily. Please help, I am losing valuable pictures that I wish to keep forever.

    How exactly have you set up sharing? How did you set R/W on the Library "file"?
    Regards
    TD

  • Why are my notes disappearing from my iphone

    Some of my notes have disappeared from my iPhone 5S. I noticed a while back on my old 4S. I spent about 3 hours at the Apple store trying to fix this. But it was a waste of time. My notes are backed up to my iCloud and yahoo so I still have them. This apparently is a common problem because there are a lot of folks asking the same question. The same answer that I have seen is how to retrieve them. That isn't a solution. Why is this happening and what needs to be done to keep it from happening. This is a very useful app but it is no good when it continues to lose my notes. Same thing is happening with my wife's 5S too! 

    Yahoo is holding Notes as hostage. Check your Yahoo account settings.

  • Why are my files disappearing?

    I having been relinking images and graphics to package an Indesign file. On a couple of the images when I would click on the folder to which the file exsisted, it would just disappear. It is not on just my computer, but on all office computers. Any Ideas?

    You are going to provide some more information than that. Nobody here can begin to guess what files you are talking about, where you are experiencing this behavior, when you are experiencing this behavior, what you are doing when the contents disappear .......

  • Why are my bookmarks disappearing then reappearing hours to days later?

    I have an iPhone 4S. After updating to iOS 6.0.1, my Safari bookmarks disappeared. They reappeared, but they continue to disappear. They'll comeback at random times - sometime hours, sometimes days later. Anyone experience this and/or know the solution? Thanks!

    Interesting never noticed that before.
    The pins on the images in the film strip are toggled on and off by the menu item Show Place badges, under the gear,
    Why that is toggled on when you select an image, view it and drop back to film strip mode is unknown.  Doesn't seem to be a use for it. If the badges are a problem you can toggle them off by going to this menu. If you need them on before going to view mode you can toggle them on here.
    You could report this to Apple Aperture->Provide Aperture Feedback as a bug.
    regards

  • Why are my samples disappearing in the piano roll?

    Hey guys,
    I have been using a J Dilla and Lex Luger drum kit in the ESX24 sampler and I recorded a beat using them, some software instruments, and audio. Everything works fine for a while and then all of the sudden the notes from the green software instrument bar disappear and I can't hear any of the things I recorded with my downloaded drum kits. I checked in the piano roll, and nothing is there. All of my other software instruments that weren't from an imported sample worked fine.
    The first time this happened, I was able to just close the project and open it up again because I didn't add anything new. Everything was there when I reopened it. But it happened a second time, and I want to see if there is a way to get my samples back without having to lose all of my progress. Any Ideas?

    jamgarske wrote:
    ... but the "notes" in the software instrument tracks that contain instruments that I downloaded from the internet have disappeared and won't play back. The green region stays there but the notes have disappeared.
    The Track (containing the Regions) and the Channel Strip (containing the Software Instrument Track) are two different objects and you can assign (reassign) a Track to any Channel Strip. That's why it is strange that the choice of Instrument (Channel Strip) affects the Regions (Track).
    Just to make sure:
    You create a Software Instrument Track (A)
    You load the EXS24 on that Channel Strip (assigned to that Track A) and load one of those drum kits you got from the internet
    You can play that drum kit on the EXS24 with your external MIDI controller when you selected that Track A.
    When you record those MIDI notes, you see a new Green MIDI Region is created on the Track Lane of Track A
    When you select that MIDI Region and open the Piano Roll (or the Event List), you don't see any MIDI notes.
    That would mean, the MIDI Region was created but no MIDI Notes were created
    Is that what happened?
    It seems that you added a DropBox link with an image. I cannot see that, only a question mark. If this is a screenshot, you can post that directly on the post by clicking the area icon in the formatting bar.

  • Why are my Events disappearing in iPhoto 11?

    This is the second time this has happened. Yesterday, I uplaoded all my photos from the past three months. I sorted the photos into multiple events. I exited iPhoto and went back in multiple times- everything was there. This morning, all those events have disappeared. I followed suggestions and reSORTed the EVENTS under the VIEW tab, by date, by title etc. I manually searched for the events by title... they have disappeared. All my events up to Sept.2013 are in place, is this a problem related to iPhoto 11? I'm not tech-confident about rebuilding my library- is this the only solution? Thank you for ANY suggestions.

    The suggestion would be to rebuild the Library.
    Option 1
    Back Up and try rebuild the library: hold down the command and option (or alt) keys while launching iPhoto. Use the resulting dialogue to rebuild. Choose to Repair Database. If that doesn't help, then try again, this time using Rebuild Database.
    If that fails:
    Option 2
    Download iPhoto Library Manager and use its rebuild function. (In early versions of Library Manager it's the File -> Rebuild command. In later versions it's under the Library menu.)
    This will create an entirely new library. It will then copy (or try to) your photos and all the associated metadata and versions to this new Library, and arrange it as close as it can to what you had in the damaged Library. It does this based on information it finds in the iPhoto sharing mechanism - but that means that things not shared won't be there, so no slideshows, books or calendars, for instance - but it should get all your events, albums and keywords, faces and places back.
    Because this process creates an entirely new library and leaves your old one untouched, it is non-destructive, and if you're not happy with the results you can simply return to your old one.  
    Regards
    TD

  • Why are safari bookmarks disappearing?

    Anyone know why safari bookmarks are disappearing after shutting down and restarting?
    Any help would be appreciated!

    Did you configure iCloud to sync Safari bookmarks?
    System Preferences > iCloud

  • Why are songs randomly disappearing from iTunes?

    Every once in while, I turn on iTunes and find that it cannot "locate" songs.  When I go into Finder, the songs are gone -- they've completely disappeared. And it's completely random -- a few songs from a number of albums, a couple of albums completely, and single songs here and there. And it doesn't matter how I got the music -- whether  I've downloaded from the iTunes store, others websites, or my own CDs.  Using an iMac 10.7.4, iTunes 10.  Can someone explain why this is happening? It also happened with my old MacBook Pro.

    My son (a former Apple Genius) finally figured out what was happening to my movies. A recent upgrade of iTunes seems to have a new feature that determines if the movie was purchased or gotten from another source. When the Add To Library option is used, if the new purchased movie was in the Movie folder, it is added to iTunes and remains in the same folder location. A movie from another source, if in the Movie folder to begin with, is moved by iTunes into the Home Videos folder in the iTunes Library. If you prefer to keep all of your movies in the Movie folder, which seems like the logical thing to do, select the movie title in iTunes and then right click to Get Info. Then select the Options tab at the top of the window, Change the Media Type to Movies - this will change the library file folder location where the file is stored and also change the location where the file is found in your AppleTV.

  • Why are my pdfs disappearing

    I'm downloading PDF files via Safari , opening in ibooks, and its all good for a day or so, then any PDF downloaded or opened from another app such as Google Drive just disappears!   All other content is fine, its just PDF's....any ideas?

    Just throwing this in the mix. My contacts had disappeared as well a couple of days ago. Very upsetting. I tried a couple of things with no effect. This morning I turned my 4s iphone off, turned it back on. Went to contacts and with no contacts showing as before, I decided i would try adding a new one. I created a contact by the name of test, and saved without further info added and all my contacts came back. Don't know why but that's what happened. Good luck.
    P.S. Come on Apple get the fix out on this, between the music app that doesn't play and the contacts disappearing, you're freaking us out.

  • Why are my emails disappearing?

    Please tell me this is a fixable problem.  What's the use of having an iPad if I have to keep logging onto my pc to check my emails?

    I'm still a bit unclear what is going on, but in general these sorts of problems are caused by checking mail on multiple devices, and having the account set up as IMAP on one device and as POP on another.  IMAP is ideal for multiple devices, as it leaves the messages on the server and syncs the mailboxes on each device with the server.  POP is not, as it is designed to remove messages from the server and store them locally only.  If the messages are disappearing from the iPad, I'd guess it is properly set to use IMAP, but some other device is using POP, and after it checks mail, the messages are removed from the server (and, thus, from the iPad).

Maybe you are looking for