I'm loading xml from a zip using the zipstream mod, and it seems there is a format mixup trying to load the xml data using loadtext:
At 'reader = TxmlTextReader.FromFile(file)' (not loading from .zip/.fui) it was fine, but thats because libxml was handling the reading.
When loading from a zip/fui I get errors like these (xml was saved from blitzmax code):
The xml file:
Local file:String = "zip::gui\base.fui//Panels/pnl_nil.xml" Local reader:TxmlTextReader If file.ToLower().StartsWith("zip::") reader = TxmlTextReader.fromDoc(LoadText(file), file, Null, 0) Else reader = TxmlTextReader.FromFile(file) 'for backwards compatibility End If 'read nodes...
At 'reader = TxmlTextReader.FromFile(file)' (not loading from .zip/.fui) it was fine, but thats because libxml was handling the reading.
When loading from a zip/fui I get errors like these (xml was saved from blitzmax code):
zip::gui\base.fui//Panels/pnl_nil.xml:1: parser error : ParsePI: PI xm space expected
<?xm
^
zip::gui\base.fui//Panels/pnl_nil.xml:1: parser error : ParsePI: PI xm never end ...
<?xm
^
<?xm
^
zip::gui\base.fui//Panels/pnl_nil.xml:1: parser error : ParsePI: PI xm never end ...
<?xm
^
The xml file:
<?xml version="1.0"?> <panel name="pnl_nil" x="45" y="41" w="750" h="544" colour="3737FF" alpha="1.0" border="true" background="true"> <label name="lbl_nil" x="56" y="485" w="72" h="16" colour="FFFFFF" alpha="1.0" textcolour="000000" textalpha="1.0" font="Default" hide="false" text="New Label" xalign="0" yalign="0"/> <slider name="sli_nil" x="9" y="471" w="150" h="15" colour="FFFFFF" alpha="1.0" textcolour="000000" textalpha="1.0" font="Default" hide="false" length="150" align="1" start="0" end="6" inc="1"/> <table name="tbl_nil" x="360" y="124" w="173" h="200" colour="FFFFFF" alpha="1.0" textcolour="000000" textalpha="1.0" font="Default" hide="false" ih="18" heading="TABLE HEADER" headcolour="7070AA" headtext="FFFFFF" headalpha="1.00000000" headtextalpha="1.00000000" selectcolour="000000" selecttext="FFFFFF" selectalpha="0.800000012" selecttextalpha="1.00000000" background="1" headbackground="1" header="true" highlight="true"/> <canvas name="cnv_nil" x="25" y="57" w="200" h="200" colour="FFFFFF" alpha="1.0" textcolour="000000" textalpha="1.0" font="Default" hide="false" background="true" events="true"/> <combobox name="cmbox_nil" x="9" y="439" w="180" h="24" colour="FFFFFF" alpha="1.0" textcolour="000000" textalpha="1.0" font="Default" hide="false" text="New Combobox" ih="21" mw="180" mh="80"/> <textfield name="txbox_nil" x="8" y="415" w="180" h="24" colour="FFFFFF" alpha="1.0" textcolour="000000" textalpha="1.0" font="Default" hide="false" text="Textbox" search="false"/> </panel>