XMLdom: Loading a XML with an '&' in a node

jensthomsen
Member Posts: 173
I have a XML with a '&' in a node (could be a name like 'Smith & Smith'). I'm not able to load this XML via the 'LOAD' command??
Are there som kind of work around to this?
Are there som kind of work around to this?
0
Comments
-
Hi
The nice practice - all tag name bring to some standard. Just look for here
http://www.xml.com/lpt/a/2001/07/25/namingparts.html
So, if some symbol is bad - just convert it to hex format like x12340 -
[quote=So, if some symbol is bad - just convert it to hex format like x1234
[/quote]
Which other symbols are "bad" ??0 -
[quote=So, if some symbol is bad - just convert it to hex format like x1234
[/quote]
Which other symbols are "bad" ??0 -
Are there any code that XMLDom would interpret as the 'Bad' characters? Or put differently: Could the sender of the XML type something different like & that XMLDom would properly interpret as '&'?0
-
And I found the solution: If the sender types "&" the XMLDom in Navision translates this to correct AND-char:-)0
-
As XML documents contain meta data & data, and there are set rules about the structure of the meta date - this requires that there be some "reserved" characters that cannot freely be used in the data.
Check out the end of this article: http://www.xmlnews.org/docs/xml-basics.html
Also check out the escape characters section in: http://hdf.ncsa.uiuc.edu/HDF5/XML/xml_escape_chars.htm
Basically there are 5 characters (<>&"') that should not be placed in XML data (as they have special meaning in the meta data tags). So if you need you need to translate those characters to values that can be put in XML data. These 5 special characters have other characters sequences that you can use - just do a simple text find & replace operation when exporting the XML data, or you can use the Hexadecimal ASCII code of the character.0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions