web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Problem in XML tag reading

(0) ShareShare
ReportReport
Posted on by 530

I am having problem importing the XML file and the following error pops up:-
Error: The '[' character, hexadecimal value 0x5B, cannot be included in a name. Line 24, position 13.

Below is a part of the XML file.

<Txt>12345678</Txt> --Transaction Text
<Invoice>AXINV507005520</Invoice>
<Dimension[1]>XYZ</Dimension[1]>
<Dimension[2]> PQR</Dimension[2]>
<Dimension[3]>ABC</Dimension[3]>

The error is due to Dimension[] fields.

How to handle this situation?

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Denis Macchinetti Profile Picture
    16,444 on at

    Hi Osama

    What you are using for import the XML ?

    About Dimension, the XML structure should be something like :

    <Dimension>

       <element>Department</element>

       <element>Cost Center</element>

       <element>Purpose</element>

    </Dimension>

    Take a look at msdn.microsoft.com/.../aa636469(v=ax.50).aspx

  • Verified answer
    Hariharans87 Profile Picture
    3 on at

    Yes. There is a problem on the Dimension[] field. Xml read function can't read this node.

    Please try to change the xml file dimension node or handle by program.

    Please read the xml content in the text file read concept and replace the node text from "Dimension[1]" to Dimension1 and create the temp xml file with updated content.

    Read the newly created temporary xml file.

  • Verified answer
    Community Member Profile Picture
    on at

    Hi!!

    You can create first the String XML and later create XML document

           XmlDocument _XML = new XmlDocument();

           _XML .loadXml(XMLText);

           _XML .save(\\\\Server\\Folder\\DOCXML.XML);

  • Verified answer
    Osama Anjum Profile Picture
    530 on at

    Thank you everyone, I changed Dimension[1] to Dimension1 and things worked.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans