By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
448,812 Members | 1,665 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 448,812 IT Pros & Developers. It's quick & easy.

XmlReference to undeclared entity, 'LT'

P: n/a
Hi

Im trying to load a XmlDataDocument with the following xml:

<ROOT>
<NAME> &LT; &AMP; &GT; " '</NAME>
</ROOT>

And i know I have a entity problem here, but i cant find any solution for
it. The problem is that i recive this from external source and cant
influence the xml content. Please help!

Best regards
Tobbe

Nov 12 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a


tobbe wrote:

Im trying to load a XmlDataDocument with the following xml:

<ROOT>
<NAME> &LT; &AMP; &GT; " '</NAME>
</ROOT>

And i know I have a entity problem here, but i cant find any solution for
it. The problem is that i recive this from external source and cant
influence the xml content.


Well the entities defined are named amp, lt and gt and they need to be
referenced as &amp; &lt; and &gt; thus whoever sends you the source
needs to learn how to send XML and not something similar to XML.

--

Martin Honnen
http://JavaScript.FAQTs.com/

Nov 12 '05 #2

P: n/a
Hmmm the message is automatic sent back from Navision to a reply queue in
msmq. Dont know how much i can change there...

I found the method XmlDataDocument.CreateEntityReference() but i cant find
any articles descibling how to us it. Can this possibly help me!?

"Martin Honnen" <ma*******@yahoo.de> skrev i meddelandet
news:%2****************@TK2MSFTNGP11.phx.gbl...


tobbe wrote:

Im trying to load a XmlDataDocument with the following xml:

<ROOT>
<NAME> &LT; &AMP; &GT; " '</NAME>
</ROOT>

And i know I have a entity problem here, but i cant find any solution for it. The problem is that i recive this from external source and cant
influence the xml content.


Well the entities defined are named amp, lt and gt and they need to be
referenced as &amp; &lt; and &gt; thus whoever sends you the source
needs to learn how to send XML and not something similar to XML.

--

Martin Honnen
http://JavaScript.FAQTs.com/

Nov 12 '05 #3

P: n/a
tobbe wrote:
Hmmm the message is automatic sent back from Navision to a reply queue in
msmq. Dont know how much i can change there...
This is definitely a bug. That's just malformed XML.
I found the method XmlDataDocument.CreateEntityReference() but i cant find
any articles descibling how to us it. Can this possibly help me!?


You want to create more entity references? Why?
You problem is that &LT; entity reference isn't defined.
Can you just string replace &LT; to &lt; before parsing the XML?
--
Oleg Tkachenko [XML MVP]
http://blog.tkachenko.com
Nov 12 '05 #4

P: n/a
--> Can you just string replace &LT; to &lt; before parsing the XML

Sure i get the xml from MSMQ as a string, ill try that!
*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 12 '05 #5

P: n/a
Thanks Oleg it work perfectly!!!

*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 12 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.