Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

It is possible to use <0></0> in xml?

Tags:

string

xml

I'm trying to build an XML file (which will be converted to JSON later on).

Therefore I must respect a schema, and i need to put <0> and <1> in the XML but it doesn't work. I also try to put <\0> and <\1> but it says that it's not a good char for XML.

<Result>
    <Content>
        <0></0>
        <1></1>
    </Content>
</Result>

In the debugger in Visual Studio I put a break point in the aim to see the xml, but with <0> i can't open the document as a XML, only as Text.

How can I fix that?

like image 617
Julien698 Avatar asked Sep 17 '25 08:09

Julien698


1 Answers

It is impossible. XML element names must start with a letter or underscore .

like image 154
zmbq Avatar answered Sep 19 '25 16:09

zmbq



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!