[lxml-dev] Standalone declaration

Ovnicraft ovnicraft at gmail.com
Thu Feb 26 01:57:30 CET 2009


2009/1/20 Ovnicraft <ovnicraft at gmail.com>

>
>
> 2009/1/20 Stefan Behnel <stefan_ml at behnel.de>
>
> Hi,
>>
>> Ovnicraft wrote:
>> > i created an xml now i want to make
>> > standalone declaration in my structure, how i can do it?
>>
>> There isn't currently a way to set the flag programmatically, but you can
>> just parse in the declaration like this:
>>
>>    doc = etree.fromstring(
>>             '<?xml version="1.0" standalone="true"?><root/>')
>>    root = doc.getroot()
>
>
getroot(), This atribute doesnt exist
so, how can i add the flag standalone?

>
>>    root[:] = your_content_elements
>
>
> I added that header with etree.tostring(root, encoding='iso-8859-1')
>
> but can i add a flag with standalone value?
>
> what instruction is for create flags in a node?
>
> regards,
>
>
>>
>> Stefan
>>
>>
>>
>
>
> --
> [b]question = (to) ? be : !be; .[/b]
>



-- 
[b]question = (to) ? be : !be; .[/b]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://codespeak.net/pipermail/lxml-dev/attachments/20090225/2710c56f/attachment.htm 


More information about the lxml-dev mailing list