Displaying # (hash) character in NAV

jordi79
Member Posts: 280
Hi,
I need to export some texts in XML format. As we all know special characters must be formatted accordingly before I can be displayed properly in XML. For example...
<XMLTag>This isn't correct</XMLTag>
must be in the form below for be displayed correctly in XML
<XMLTag>This isn't correct</XMLTag>
The problem with NAV is that, whenever it sees a # sign, it assumes that it is a dialog tag for progress bars (I think this is what NAV is doing...), and in when exported in text file, it became:
<XMLTag>This isn& 39;t correct</XMLTag>
How do you print or display the # character in NAV? I have tried creating a char variable and assigning it to 35 (which is the ASCII code for Hash) but this does not work. Anyone have any ideas?
I need to export some texts in XML format. As we all know special characters must be formatted accordingly before I can be displayed properly in XML. For example...
<XMLTag>This isn't correct</XMLTag>
must be in the form below for be displayed correctly in XML
<XMLTag>This isn't correct</XMLTag>
The problem with NAV is that, whenever it sees a # sign, it assumes that it is a dialog tag for progress bars (I think this is what NAV is doing...), and in when exported in text file, it became:
<XMLTag>This isn& 39;t correct</XMLTag>
How do you print or display the # character in NAV? I have tried creating a char variable and assigning it to 35 (which is the ASCII code for Hash) but this does not work. Anyone have any ideas?
0
Comments
-
Create a text variable and give it a value of #. Then you can use the text variable in your code. Maybe that will work.
Are you using the xml dom to create your xml file or are you doing it manually?Jason Wilder
jwilder@stonewallkitchen.com0 -
hi,
Just tried that. It does not work too.
str2 := '#';
MESSAGE('&' + str2 + '39;');
Microsoft Dynamics NAV
& ;
OK
0 -
Have you tried the normal HTML entity for the apostrophe : ' ?0
-
MBerger wrote:Have you tried the normal HTML entity for the apostrophe : ' ?
Brilliant solution. It works. I did not know special chars can be represented in 2 forms. the numeric form and code form. numeric form being ' and code form being '
Anyway, problem solved for this. But really... in the case that you really did need to print the character #, how do you do it in NAV? I wonder... :-k0
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