XML Invalid Characters - InfoPath Dev
in

InfoPath Dev

XML Invalid Characters

Last post 07-10-2006 11:36 AM by tricia. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 06-12-2006 12:18 PM

    • tricia
    • Not Ranked
    • Joined on 06-12-2006
    • Canada
    • Posts 3

    XML Invalid Characters

    Any idea why an = sign is "invalid"? Created the vehicle flatfile db tutorial example, saved to a new name and started changing the data fields, since this example provides the format I need. I'm trying to find what is acceptable and not for xml coding and found this forum, any link to that info? Thanks for your help!

    error message:
    The form contains XML that cannot be parsed:
    A name contained an invalid character.

    Line 3, Position 14
    <Category="2000" Description="Atmos_Air_Mattress" Model="2033A-59589"/>
    -------------^
  • 06-12-2006 05:29 PM In reply to

    • SamDahl
    • Top 500 Contributor
    • Joined on 03-29-2006
    • Australia
    • Posts 44
    The problem isn't so much that the "=" is invalid. It's just in the wrong spot.

    Each tag or element requires a name and a closing tag (unless it's selfclosing). An element can also optionally have attribute/value pairs.
    Your element is selfclosing (it has the "/" inside at the end). It does, however, require a name.

    <ElementName Attribute="value"/>

    <Category="2000" Description="Atmos_Air_Mattress" Model="2033A-59589"/>

    When the parser gets to your element it takes the first text after the "<" and treats it as the element's name. A name can't have a value so when the parser gets to the equals sign it gives up and throws an error at you.

    Hope this helps and goodluck in your future xml adventures.
  • 06-13-2006 06:22 PM In reply to

    Awesome response, SamDahl! Tricia, try this:

    <Category Description="Atmos_Air_Mattress" Model="2033A-59589">2000</Category>
    Matt Faus / Microsoft InfoPath MVP
    Qdabra® Software / Streamline data gathering to turn process into knowledge
  • 07-05-2006 09:03 AM In reply to

    This has been driving me crazy for ages!
    many thanks SamDahl!
  • 07-10-2006 11:36 AM In reply to

    • tricia
    • Not Ranked
    • Joined on 06-12-2006
    • Canada
    • Posts 3
    My thanks too!
Page 1 of 1 (5 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.