I just tried to convert the sample XML from XML::Rules' SYNOPSIS into a schema:
trang test.xml test.rnc
And the result:
default namespace = ""
start =
element doc {
element person {
element fname { xsd:NMTOKEN },
element lname { xsd:NMTOKEN },
element email { xsd:NMTOKEN },
element address {
element street { xsd:NMTOKEN },
element city { xsd:NMTOKEN },
element country { xsd:NMTOKEN },
element bogus { xsd:NMTOKEN }
},
element phones {
element phone {
attribute type { xsd:NCName },
xsd:NMTOKEN
}+
}
}+
}
Which looks quite reasonable. trang can also convert into .xsd files, which look uglier but are needed for XML::Compile operation.
In reply to Re^5: Simpler than XML::Simple
by Anonymous Monk
in thread Simpler than XML::Simple
by Jenda
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |