I posted this a few days ago and didn't get any response.
I try again but ask it a little differently.
I'm recieving any XML document from a client and I need to
convert it to an ASCII delimited string to input into a
legacy system. I've put together a VB.Net class that does
this using DOM commands such as SelectSingleNode(). It
works fine but I've noticed that it can not read past
inbedded namespaces that are found throghout the
document. I don't use namespaces in my own XML document
so I do not know how to make this work or if I can. The
system they are using seems to be using an old scheme
definition that is .xml and not .xsd. I think I'm working
with something that I am not fimilar enough with to know
exactly how to approach this. To work around this
namespace problem, I've written some not-so-great
functions that strip out the namespaces using string
manipulation. I really don't like this approach because
it is not as dynamic as I would like it to be.
Does anyone know why my SelectSingleNode statements can
not read past these namespace attributes on different
nodes throughout the XML document? Is there a way that I
can get it to just ignore these? I don't need them or
want them. I would like to write a routine that just
ignores them or to simple removes all of the namespaces
out of the XML document. Maybe I should be approaching
this differently. If you have any ideas, please let me
know.
Here is a sample of a node in the XML document with a
namespace. I can not use the SelectSingleNode() to read
anything until the profile node. Any ideas why? Should I
be able to do this? I'm using the System.XML.XMLDocument
and SelectSingleNode() command to read the profileID
element and I can not find it... unless I remove the
namespace.
<ResProfiles>
<ResProfile>
<Profile xmlns="profile.fidelio.1.2"
profileType="GUEST">
<profileID>7349133</profileID>
<creatorCode>DALLAS</creatorCode>
I would really appreciate any guidance or suggestions.
Thanks for your time....
Greg Rothlander