• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

XML Parsing Problems with Namespace

Guest
Jun 12, 2007 Jun 12, 2007

Copy link to clipboard

Copied

A supplier generates XML code which an MX7 application needs to parse to convert to data on the CFM page.

The line <cfset myXml = xmlParse(theXml)> is used to obtain the code, which brings up the error:-

"The prefix "xsi" for attribute "xsi:type" associated with an element type "FAB_PkgAvailRS" is not bound."

This relates to the line in the XML:-

<FAB_PkgAvailRS Target="test" Version="2002A" xsi:type="FAB_PkgAvailRS"> , where the Namespace xsi throws the Parser.

What can be done about it.

If the xsi phrase is removed, it parses very easily.

Any help would be appreciated.
TOPICS
Advanced techniques

Views

493

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Advocate , Jun 12, 2007 Jun 12, 2007
Which goes back to my first question - is the namespace prefix "xsi:" actually defined in the document?

Votes

Translate

Translate
Advocate ,
Jun 12, 2007 Jun 12, 2007

Copy link to clipboard

Copied

Is your namespace defined in the document? If not, why not just remove the text "xsi:" ?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jun 12, 2007 Jun 12, 2007

Copy link to clipboard

Copied

That's exactly what I had hoped could happen, but the supplier has informed me that the namespace is standard XML, which it is, and any XML Editor reads it without any problem, so that it has to stay in to correctly declare the following XML and I'm stuck with it.

So how do I parse the XML with that phrase included?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Jun 12, 2007 Jun 12, 2007

Copy link to clipboard

Copied

LATEST
Which goes back to my first question - is the namespace prefix "xsi:" actually defined in the document?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation