"document list" problem in xmlNodeToDocument

I am trying to convert an xml string to a document by pub.xml:xmlStringtoXMLNode and pub.xml:xmlNodeToDocument.

I set makeArrays false and giving the doctype name; however, it doesn’t give me list elements.

what I should do? I am using version 6.1

Shuren

Does the structure of the document match the structure of the document type? That’s the only reason I can think of off the top of my head that would explain this behavior.

Are the list elements missing, or just incorrectly formatted?

Sometimes if the XML has the first line missing

<?xml version="1.0" encoding="UTF-8"?>

then too I have seen that it does not show the list elements

Regards,
Bala

Are you specifying ‘isXML’ as ‘true’ in pub.xml:xmlStringtoXMLNode? Failing to do that can sometimes “flatten out” your resulting document.

Tim

Hi, thanks your help.

here is the string before it covert to xmlNode, I defined isXML it ture.
I also attached the picture of the document structure.

so any problem you can see?

thanks,

Shuren

<?xml version="1.0"?> y11 y22 y33 x11 x22 x33

I only get the last element, and missing structure of the document list.

Shuren

Yes, the structure of the document match the structure of the document type. I post the string of the document before it convert to xmlNode, also, I attach a image of the document.

Maybe you can find something.

thanks,

Shuren

<?xml version="1.0"?> y11 y22 y33 x11 x22 x33

I think the ‘order2’ element is causing your problem. I believe IS is seeing that as the root node, which doesn’t match up to your document type. Everything underneath is being treated as undefined data. If you create a new document type based on your XML it will have the structure you need. HTH,

Tim

Tim,

You are right. I removed the root tag order2, and got the correct document structure.

Thanks,

Shuren

Actually, it does not match. The order2 element is in the doc but not the doc type.

P.S.
Oops. Sorry. Saw Tim’s post after I posted. Never mind!

Hi Guys,

This post is pretty old however my query bests suits here.
I have a bit complicated structure.( in the attached document)

If you see the attachment the, we use documentType for converting xml to document. Now if the xml contains more than one times then the document does not create all the instances.

Could you have any clue if I am doing it properly…

ex. of the xml:

<?xml version="1.0" encoding="UTF-8"?>

<triplep_prov_ssw_change>

XXX
XX
XXX
XX
XXX
XXX
XXXX
XXX



XXX


XXX


XXX
XXX


XXX
XXX


XXX
TRUE


XXX
XXX


XXX
XXX


XXX
XXX




</triplep_prov_ssw_change>

regards,
Sumit