Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8667927
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T18:05:11+00:00 2026-06-12T18:05:11+00:00

So I have XML with perfectly nested tags, however I’m ending up with weird

  • 0

So I have XML with perfectly nested tags, however I’m ending up with weird characters directly outside of tags, such as:

<root><a_tag>Some perfectly valid string</a_tag> this
<b_tag>more data</b_tag>  
<c_tag>some more data</c_tag> 0</root>

Is there a function in PHP that does this natively, or will I need a regex to accomplish it?

Only function I’m already running on is from this answer: https://stackoverflow.com/a/3466049

Edit: When opening the file with emacs, the end of each line has a set of characters such as: ^@ or ^@S

Also – these documents were generated with InDesign.

Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T18:05:12+00:00Added an answer on June 12, 2026 at 6:05 pm

    After a lot of wasted time, the issue was simply Adobe InDesign producing a lot of weird characters into the exported XML – the ultimate solution ended up being altering an InDesign setting called:

    Remap Break, Whitespace, and Special Characters
    

    Which solved the XML issues instantly.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a call to a YouTube XML sheet that works perfectly fine. However,
I have xml file with such structure: ... <outer> ... <inner/> ... </outer> ...
I have a conversion rate script which i know works perfectly outside of a
I am receiving an XML response which comes through perfectly. Words such as português
I have following XML in this.treeSpec variable. <root> <item id=9PQ0 pathId=08Z specId=9PQ0 rel=MainRequest> <content>
I have written a perfectly working XML parser using PHP... using, $xml = simplexml_load_file($newfile);
I have XML in the following form that I want to parse with PHP
I have xml as follows <Search> <Term /> <And /> <Term /> <And />
I Have XML similar to this(omitted parts for brevity): <uformrecord> <state>Submitted</state> <created>2012-06-19T11:31:54</created> <updated>2012-06-19T11:32:13</updated> <id>53225sas3c1-d727-42cd-93a6-97cd778e5ee9</id>
I have XML in the form: <Books> <Book> <Name>Lord of the Rings</Name> </Book> <Book>

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.