Hi friends
I am using xmladapter class to create xml files and my following code
working fine.
LOCAL oXMLadapter as XMLAdapter
oXMLadapter = CREATEOBJECT("XMLAdapter")
WITH oXMLadapter
.AddTableSchema('nhi') && content to the xml file
.ForceCloseTag= .T. && maintain open and close tags .RespectCursorCP =
.T.
.UTF8Encoded = .T.
*--XML file will created according to XSD file (schema)
.XMLSchemaLocation = "C:\OpthalmologyVirtualConsultationPatientSchema.xsd"
.ToXML('c:\xx.xml',,.T.)
ENDWITH

and i've quick question i've a column in my cursor(nhi) which i dont want
see in final XML file.my schema file does not have that element in it but
still TOXML method still
create that column in final output file.
is there any way to exclude that column in final XML file ??
Thanks for ur ideas
--
cheers

Re: exclude a field in final output XML file by Dan

Dan
Tue Jan 11 17:38:28 CST 2005

Run a query that includes only those fields you need, and use that in
.AddTableSchema().

Dan

rajani wrote:
> Hi friends
> I am using xmladapter class to create xml files and my following code
> working fine.
> LOCAL oXMLadapter as XMLAdapter
> oXMLadapter = CREATEOBJECT("XMLAdapter")
> WITH oXMLadapter
> .AddTableSchema('nhi') && content to the xml file
> .ForceCloseTag= .T. && maintain open and close tags .RespectCursorCP =
> .T.
> .UTF8Encoded = .T.
> *--XML file will created according to XSD file (schema)
> .XMLSchemaLocation =
> "C:\OpthalmologyVirtualConsultationPatientSchema.xsd"
> .ToXML('c:\xx.xml',,.T.)
> ENDWITH
>
> and i've quick question i've a column in my cursor(nhi) which i dont
> want see in final XML file.my schema file does not have that element
> in it but still TOXML method still
> create that column in final output file.
> is there any way to exclude that column in final XML file ??
> Thanks for ur ideas



Re: exclude a field in final output XML file by rajani

rajani
Tue Jan 11 17:49:03 CST 2005

actually Dan ,i thought abt that.
i wondered is there any property in xmladapter class that will exclude
element that
are not listed in schema(XSD) file.
Thanks

"Dan Freeman" wrote:

> Run a query that includes only those fields you need, and use that in
> ..AddTableSchema().
>
> Dan
>
> rajani wrote:
> > Hi friends
> > I am using xmladapter class to create xml files and my following code
> > working fine.
> > LOCAL oXMLadapter as XMLAdapter
> > oXMLadapter = CREATEOBJECT("XMLAdapter")
> > WITH oXMLadapter
> > .AddTableSchema('nhi') && content to the xml file
> > .ForceCloseTag= .T. && maintain open and close tags .RespectCursorCP =
> > .T.
> > .UTF8Encoded = .T.
> > *--XML file will created according to XSD file (schema)
> > .XMLSchemaLocation =
> > "C:\OpthalmologyVirtualConsultationPatientSchema.xsd"
> > .ToXML('c:\xx.xml',,.T.)
> > ENDWITH
> >
> > and i've quick question i've a column in my cursor(nhi) which i dont
> > want see in final XML file.my schema file does not have that element
> > in it but still TOXML method still
> > create that column in final output file.
> > is there any way to exclude that column in final XML file ??
> > Thanks for ur ideas
>
>
>

Re: exclude a field in final output XML file by rajani

rajani
Tue Jan 11 19:53:02 CST 2005

By the way Dan
Do u know how to add a child table to my abv tableschema(i.e. NHI) ?

Thanks

"Dan Freeman" wrote:

> Run a query that includes only those fields you need, and use that in
> ..AddTableSchema().
>
> Dan
>
> rajani wrote:
> > Hi friends
> > I am using xmladapter class to create xml files and my following code
> > working fine.
> > LOCAL oXMLadapter as XMLAdapter
> > oXMLadapter = CREATEOBJECT("XMLAdapter")
> > WITH oXMLadapter
> > .AddTableSchema('nhi') && content to the xml file
> > .ForceCloseTag= .T. && maintain open and close tags .RespectCursorCP =
> > .T.
> > .UTF8Encoded = .T.
> > *--XML file will created according to XSD file (schema)
> > .XMLSchemaLocation =
> > "C:\OpthalmologyVirtualConsultationPatientSchema.xsd"
> > .ToXML('c:\xx.xml',,.T.)
> > ENDWITH
> >
> > and i've quick question i've a column in my cursor(nhi) which i dont
> > want see in final XML file.my schema file does not have that element
> > in it but still TOXML method still
> > create that column in final output file.
> > is there any way to exclude that column in final XML file ??
> > Thanks for ur ideas
>
>
>

Re: exclude a field in final output XML file by Dan

Dan
Wed Jan 12 11:08:42 CST 2005

Perhaps someone more familiar with XMLAdapter can chime in.

Dan

rajani wrote:
> By the way Dan
> Do u know how to add a child table to my abv tableschema(i.e. NHI) ?
>
> Thanks
>
> "Dan Freeman" wrote:
>
>> Run a query that includes only those fields you need, and use that in
>> ..AddTableSchema().
>>
>> Dan
>>
>> rajani wrote:
>>> Hi friends
>>> I am using xmladapter class to create xml files and my following
>>> code working fine.
>>> LOCAL oXMLadapter as XMLAdapter
>>> oXMLadapter = CREATEOBJECT("XMLAdapter")
>>> WITH oXMLadapter
>>> .AddTableSchema('nhi') && content to the xml file
>>> .ForceCloseTag= .T. && maintain open and close tags
>>> .RespectCursorCP = .T.
>>> .UTF8Encoded = .T.
>>> *--XML file will created according to XSD file (schema)
>>> .XMLSchemaLocation =
>>> "C:\OpthalmologyVirtualConsultationPatientSchema.xsd"
>>> .ToXML('c:\xx.xml',,.T.)
>>> ENDWITH
>>>
>>> and i've quick question i've a column in my cursor(nhi) which i dont
>>> want see in final XML file.my schema file does not have that element
>>> in it but still TOXML method still
>>> create that column in final output file.
>>> is there any way to exclude that column in final XML file ??
>>> Thanks for ur ideas